{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "from galgebra_ipython_helpers import check\n",
    "os.chdir('../LaTeX')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} g_{ii} = \\left[\\begin{array}{cccc}0 & 0 & 1 & 0\\\\0 & 0 & 0 & 1\\\\1 & 0 & 0 & 0\\\\0 & 1 & 0 & 0\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} x_1\\rfloor x_1== 1 \\end{equation*}\n",
       "\\begin{equation*} x_1\\rfloor x_2==  0 \\end{equation*}\n",
       "\\begin{equation*} x_2\\rfloor x_1==  0 \\end{equation*}\n",
       "\\begin{equation*} x_2\\rfloor x_2== 1 \\end{equation*}\n",
       "$-\\infty < v < \\infty$\n",
       "\\begin{equation*} (-v (x_1\\W x_2)/2).exp()== \\cos{\\left (\\frac{\\left|{v}\\right|}{2} \\right )}  - \\frac{v \\sin{\\left (\\frac{\\left|{v}\\right|}{2} \\right )}}{2 \\left|{v}\\right|} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} - \\frac{v \\sin{\\left (\\frac{\\left|{v}\\right|}{2} \\right )}}{2 \\left|{v}\\right|} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{4} + \\frac{v \\sin{\\left (\\frac{\\left|{v}\\right|}{2} \\right )}}{2 \\left|{v}\\right|} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} - \\frac{v \\sin{\\left (\\frac{\\left|{v}\\right|}{2} \\right )}}{2 \\left|{v}\\right|} \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4} \\end{equation*}\n",
       "$0\\le v < \\infty$\n",
       "\\begin{equation*} (-v (x_1\\W x_2)/2).exp()== \\cos{\\left (\\frac{v}{2} \\right )}  - \\frac{\\sin{\\left (\\frac{v}{2} \\right )}}{2} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} - \\frac{\\sin{\\left (\\frac{v}{2} \\right )}}{2} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{4} + \\frac{\\sin{\\left (\\frac{v}{2} \\right )}}{2} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} - \\frac{\\sin{\\left (\\frac{v}{2} \\right )}}{2} \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('4Derr')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "Derivatives in Spherical Coordinates\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} A = A^{r}  \\boldsymbol{e}_{r} + A^{\\theta }  \\boldsymbol{e}_{\\theta } + A^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = B^{r\\theta }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + B^{r\\phi }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + B^{\\theta \\phi }  \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{r} f  \\boldsymbol{e}_{r} + \\frac{\\partial_{\\theta } f }{r^{2}} \\boldsymbol{e}_{\\theta } + \\frac{\\partial_{\\phi } f }{r^{2} {\\sin{\\left (\\theta  \\right )}}^{2}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{A^{\\theta } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\phi } A^{\\phi }  + \\partial_{r} A^{r}  + \\partial_{\\theta } A^{\\theta }  + \\frac{2 A^{r} }{r} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\times A = -I (\\boldsymbol{\\nabla} \\W A) = \\left(\\frac{2 A^{\\phi } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } A^{\\phi }  - \\frac{\\partial_{\\phi } A^{\\theta } }{{\\sin{\\left (\\theta  \\right )}}^{2}}\\right) \\left|{\\sin{\\left (\\theta  \\right )}}\\right| \\boldsymbol{e}_{r} + \\frac{- r^{2} {\\sin{\\left (\\theta  \\right )}}^{2} \\partial_{r} A^{\\phi }  - 2 r A^{\\phi }  {\\sin{\\left (\\theta  \\right )}}^{2} + \\partial_{\\phi } A^{r} }{r^{2} \\left|{\\sin{\\left (\\theta  \\right )}}\\right|} \\boldsymbol{e}_{\\theta } + \\frac{r^{2} \\partial_{r} A^{\\theta }  + 2 r A^{\\theta }  - \\partial_{\\theta } A^{r} }{r^{2} \\left|{\\sin{\\left (\\theta  \\right )}}\\right|} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\nabla^{2}f = \\frac{r^{2} \\partial^{2}_{r} f  + 2 r \\partial_{r} f  + \\partial^{2}_{\\theta } f  + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta  \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta  \\right )}}^{2}}}{r^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\frac{r^{2} \\partial_{r} B^{\\theta \\phi }  + 4 r B^{\\theta \\phi }  - \\frac{2 B^{r\\phi } }{\\tan{\\left (\\theta  \\right )}} - \\partial_{\\theta } B^{r\\phi }  + \\frac{\\partial_{\\phi } B^{r\\theta } }{{\\sin{\\left (\\theta  \\right )}}^{2}}}{r^{2}} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "Derivatives in Paraboloidal Coordinates\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} A = A^{u}  \\boldsymbol{e}_{u} + A^{v}  \\boldsymbol{e}_{v} + A^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = B^{uv}  \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} + B^{u\\phi }  \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{\\phi } + B^{v\\phi }  \\boldsymbol{e}_{v}\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\frac{\\partial_{u} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{u} + \\frac{\\partial_{v} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{v} + \\frac{\\partial_{\\phi } f }{u v} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{u A^{u} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{v A^{v} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{\\partial_{u} A^{u} }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{v} A^{v} }{\\sqrt{u^{2} + v^{2}}} + \\frac{A^{v} }{v \\sqrt{u^{2} + v^{2}}} + \\frac{A^{u} }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } A^{\\phi } }{u v} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\frac{u B^{v\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{v B^{u\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{\\partial_{v} B^{u\\phi } }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{u} B^{v\\phi } }{\\sqrt{u^{2} + v^{2}}} - \\frac{B^{u\\phi } }{v \\sqrt{u^{2} + v^{2}}} + \\frac{B^{v\\phi } }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } B^{uv} }{u v}\\right ) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v}\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "Derivatives in Prolate Spheroidal Coordinates\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} A = A^{\\xi }  \\boldsymbol{e}_{\\xi } + A^{\\eta }  \\boldsymbol{e}_{\\eta } + A^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = B^{\\xi \\eta }  \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\eta } + B^{\\xi \\phi }  \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\phi } + B^{\\eta \\phi }  \\boldsymbol{e}_{\\eta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\frac{\\partial_{\\xi } f }{\\sqrt{{\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\xi } + \\frac{\\partial_{\\eta } f }{\\sqrt{{\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\eta } + \\frac{\\partial_{\\phi } f }{a \\sin{\\left (\\eta  \\right )} \\sinh{\\left (\\xi  \\right )}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{a \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{3} \\partial_{\\phi } A^{\\phi }  + \\frac{\\left(A^{\\eta }  \\sin{\\left (2 \\eta  \\right )} + A^{\\xi }  \\sinh{\\left (2 \\xi  \\right )}\\right) \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{\\frac{3}{2}} \\sin{\\left (\\eta  \\right )} \\sinh{\\left (\\xi  \\right )} \\left|{a}\\right|}{2} + \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{\\frac{5}{2}} \\left(\\partial_{\\eta } A^{\\eta }  + \\partial_{\\xi } A^{\\xi } \\right) \\sin{\\left (\\eta  \\right )} \\sinh{\\left (\\xi  \\right )} \\left|{a}\\right| + \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{\\frac{5}{2}} A^{\\eta }  \\cos{\\left (\\eta  \\right )} \\sinh{\\left (\\xi  \\right )} \\left|{a}\\right| + \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{\\frac{5}{2}} A^{\\xi }  \\sin{\\left (\\eta  \\right )} \\cosh{\\left (\\xi  \\right )} \\left|{a}\\right|}{a^{2} \\left({\\sin{\\left (\\eta  \\right )}}^{2} + {\\sinh{\\left (\\xi  \\right )}}^{2}\\right)^{3} \\sin{\\left (\\eta  \\right )} \\sinh{\\left (\\xi  \\right )}} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('curvi_linear_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\left[\\begin{array}{ccc}\\left (\\boldsymbol{e}_{a}\\cdot \\boldsymbol{e}_{a}\\right )  & 0 & \\left (\\boldsymbol{e}_{a}\\cdot \\boldsymbol{e}_{b}\\right ) \\\\0 & \\left (\\boldsymbol{e}_{ab}\\cdot \\boldsymbol{e}_{ab}\\right )  & 0\\\\\\left (\\boldsymbol{e}_{a}\\cdot \\boldsymbol{e}_{b}\\right )  & 0 & \\left (\\boldsymbol{e}_{b}\\cdot \\boldsymbol{e}_{b}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} v^{a} \\boldsymbol{e}_{a} + v^{ab} \\boldsymbol{e}_{ab} + v^{b} \\boldsymbol{e}_{b} \\end{equation*}\n",
       "\\begin{equation*} B^{aab} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{ab} + B^{ab} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{b} + B^{abb} \\boldsymbol{e}_{ab}\\wedge \\boldsymbol{e}_{b} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('dchk')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def main():\n",
       "    Print_Function()\n",
       "    (a, b, c) = abc = symbols('a,b,c',real=True)\n",
       "    (o3d, ea, eb, ec) = Ga.build('e_a e_b e_c', g=[1, 1, 1], coords=abc)\n",
       "    grad = o3d.grad\n",
       "    x = symbols('x',real=True)\n",
       "    A = o3d.lt([[x*a*c**2,x**2*a*b*c,x**2*a**3*b**5],\\\n",
       "                [x**3*a**2*b*c,x**4*a*b**2*c**5,5*x**4*a*b**2*c],\\\n",
       "                [x**4*a*b**2*c**4,4*x**4*a*b**2*c**2,4*x**4*a**5*b**2*c]])\n",
       "    print('A =',A)\n",
       "    v = a*ea+b*eb+c*ec\n",
       "    print('v =',v)\n",
       "    f = v|A(v)\n",
       "    print(r'%f = v\\cdot \\f{A}{v} =',f)\n",
       "    (grad * f).Fmt(3,r'%\\nabla f')\n",
       "    Av = A(v)\n",
       "    print(r'%\\f{A}{v} =', Av)\n",
       "    (grad * Av).Fmt(3,r'%\\nabla \\f{A}{v}')\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{a}\\right ) =& a c^{2} x \\boldsymbol{e}_{a} + a b c x^{2} \\boldsymbol{e}_{b} + a^{3} b^{5} x^{2} \\boldsymbol{e}_{c} \\\\ L \\left ( \\boldsymbol{e}_{b}\\right ) =& a^{2} b c x^{3} \\boldsymbol{e}_{a} + a b^{2} c^{5} x^{4} \\boldsymbol{e}_{b} + 5 a b^{2} c x^{4} \\boldsymbol{e}_{c} \\\\ L \\left ( \\boldsymbol{e}_{c}\\right ) =& a b^{2} c^{4} x^{4} \\boldsymbol{e}_{a} + 4 a b^{2} c^{2} x^{4} \\boldsymbol{e}_{b} + 4 a^{5} b^{2} c x^{4} \\boldsymbol{e}_{c}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} v = a \\boldsymbol{e}_{a} + b \\boldsymbol{e}_{b} + c \\boldsymbol{e}_{c} \\end{equation*}\n",
       "\\begin{equation*} f = v\\cdot \\f{A}{v} = a c x \\left(4 a^{4} b^{2} c^{2} x^{3} + a^{3} b^{5} x + a^{2} b^{2} x^{2} + a^{2} c + a b^{2} c^{4} x^{3} + a b^{2} x + b^{4} c^{4} x^{3} + 4 b^{3} c^{2} x^{3} + 5 b^{3} c x^{3}\\right) \\end{equation*}\n",
       "\\begin{equation*} \\f{A}{v} = a c x \\left(a b^{2} x^{2} + a c + b^{2} c^{4} x^{3}\\right) \\boldsymbol{e}_{a} + a b c x^{2} \\left(a + b^{2} c^{4} x^{2} + 4 b c^{2} x^{2}\\right) \\boldsymbol{e}_{b} + a b^{2} x^{2} \\left(4 a^{4} c^{2} x^{2} + a^{3} b^{3} + 5 b c x^{2}\\right) \\boldsymbol{e}_{c} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('diffeq_sys')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\psi   + \\psi ^{01} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{1} + \\psi ^{02} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{2} + \\psi ^{03} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{3} + \\psi ^{12} \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{2} + \\psi ^{13} \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{3} + \\psi ^{23} \\boldsymbol{\\gamma }_{2}\\wedge \\boldsymbol{\\gamma }_{3} + \\psi ^{0123} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{2}\\wedge \\boldsymbol{\\gamma }_{3} \\end{equation*}\n",
       "\\begin{equation*} B^{01} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{1} + B^{02} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{2} + B^{03} \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{3} + B^{12} \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{2} + B^{13} \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{3} + B^{23} \\boldsymbol{\\gamma }_{2}\\wedge \\boldsymbol{\\gamma }_{3} \\end{equation*}\n",
       "\\begin{equation*} \\left ( - 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{02} \\psi ^{12} + 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{12} \\psi ^{02} - 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{03} \\psi ^{13} + 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{13} \\psi ^{03}\\right ) \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{1} + \\left ( 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{01} \\psi ^{12} - 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{12} \\psi ^{01} - 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{03} \\psi ^{23} + 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{23} \\psi ^{03}\\right ) \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{2} + \\left ( 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{01} \\psi ^{13} - 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{13} \\psi ^{01} + 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{02} \\psi ^{23} - 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{23} \\psi ^{02}\\right ) \\boldsymbol{\\gamma }_{0}\\wedge \\boldsymbol{\\gamma }_{3} + \\left ( - 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{01} \\psi ^{02} + 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{02} \\psi ^{01} - 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{13} \\psi ^{23} + 2 \\left (\\boldsymbol{\\gamma }_{3}\\cdot \\boldsymbol{\\gamma }_{3}\\right )  B^{23} \\psi ^{13}\\right ) \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{2} + \\left ( - 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{01} \\psi ^{03} + 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{03} \\psi ^{01} + 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{12} \\psi ^{23} - 2 \\left (\\boldsymbol{\\gamma }_{2}\\cdot \\boldsymbol{\\gamma }_{2}\\right )  B^{23} \\psi ^{12}\\right ) \\boldsymbol{\\gamma }_{1}\\wedge \\boldsymbol{\\gamma }_{3} + \\left ( - 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{02} \\psi ^{03} + 2 \\left (\\boldsymbol{\\gamma }_{0}\\cdot \\boldsymbol{\\gamma }_{0}\\right )  B^{03} \\psi ^{02} - 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{12} \\psi ^{13} + 2 \\left (\\boldsymbol{\\gamma }_{1}\\cdot \\boldsymbol{\\gamma }_{1}\\right )  B^{13} \\psi ^{12}\\right ) \\boldsymbol{\\gamma }_{2}\\wedge \\boldsymbol{\\gamma }_{3} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('dirac_derive')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={6in,7in},total={5in,6in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\nabla = \\boldsymbol{e}_{x} \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} \\nabla^{2} = \\nabla \\cdot \\nabla = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\lp\\nabla^{2}\\rp f = \\partial^{2}_{x} f  + \\partial^{2}_{y} f  + \\partial^{2}_{z} f \\end{equation*}\n",
       "\\begin{equation*} \\nabla\\cdot\\lp\\nabla f\\rp = \\partial^{2}_{x} f  + \\partial^{2}_{y} f  + \\partial^{2}_{z} f \\end{equation*}\n",
       "\\begin{equation*} \\nabla^{2} = \\nabla\\cdot\\nabla = \\frac{2}{r} \\frac{\\partial}{\\partial r} + \\frac{1}{r^{2} \\tan{\\left (\\theta  \\right )}} \\frac{\\partial}{\\partial \\theta } + \\frac{1}{r^{2} {\\sin{\\left (\\theta  \\right )}}^{2}} \\frac{\\partial^{2}}{\\partial \\phi ^{2}} + \\frac{\\partial^{2}}{\\partial r^{2}} + r^{-2} \\frac{\\partial^{2}}{\\partial \\theta ^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\lp\\nabla^{2}\\rp f = \\frac{r^{2} \\partial^{2}_{r} f  + 2 r \\partial_{r} f  + \\partial^{2}_{\\theta } f  + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta  \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta  \\right )}}^{2}}}{r^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\nabla\\cdot\\lp\\nabla f\\rp = \\frac{r^{2} \\partial^{2}_{r} f  + 2 r \\partial_{r} f  + \\partial^{2}_{\\theta } f  + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta  \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta  \\right )}}^{2}}}{r^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\begin{array}{c} \\left [ \\boldsymbol{e}_{x} \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} \\frac{\\partial}{\\partial z}, \\right. \\\\  \\left. \\boldsymbol{e}_{x} \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} \\frac{\\partial}{\\partial z}\\right ] \\\\ \\end{array} \\end{equation*}\n",
       "\\begin{equation*} F \\end{equation*}\n",
       "\\begin{equation*} F^{r}  \\boldsymbol{e}_{r} + F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} F \\end{equation*}\n",
       "\\begin{equation*} F^{r}  \\boldsymbol{e}_{r} + F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} F \\end{equation*}\n",
       "\\begin{equation*} \\begin{array}{c} \\left ( F^{r}  \\boldsymbol{e}_{r} + F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi }, \\right. \\\\  \\left. F^{r}  \\boldsymbol{e}_{r} + F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi }\\right ) \\\\ \\end{array} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('Dop')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\text{Pseudo Scalar\\;\\;}I =  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} I_{xyz} =  \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} \\text{Electromagnetic Field Bi-Vector\\;\\;} F =  \\begin{aligned}[t]  & - E^{x} e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\  &  - E^{y} e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\  &  - E^{z} e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  - B^{z} e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\  &  + B^{y} e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  - B^{x} e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z}  \\end{aligned} \\end{equation*}\n",
       "Geom Derivative of Electomagnetic Field Bi-Vector\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F = 0 =  \\begin{aligned}[t]  & - i \\left(E^{x} k_{x} + E^{y} k_{y} + E^{z} k_{z}\\right) e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{t} \\\\  &  + i \\left(B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{x} \\\\  &  + i \\left(- B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{y} \\\\  &  + i \\left(B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{z} \\\\  &  + i \\left(- B^{z} \\omega  - E^{x} k_{y} + E^{y} k_{x}\\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\  &  + i \\left(B^{y} \\omega  - E^{x} k_{z} + E^{z} k_{x}\\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  + i \\left(- B^{x} \\omega  - E^{y} k_{z} + E^{z} k_{y}\\right) e^{i \\left(- k_{x} x - k_{y} y - k_{z} z + \\omega  t\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  - i \\left(B^{x} k_{x} + B^{y} k_{y} + B^{z} k_{z}\\right) e^{- i \\left(k_{x} x + k_{y} y + k_{z} z - \\omega  t\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} \\lp\\bm{\\nabla}F\\rp /\\lp i e^{iK\\cdot X}\\rp = 0 =  \\begin{aligned}[t]  & \\left ( - E^{x} k_{x} - E^{y} k_{y} - E^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{t} \\\\  &  + \\left ( B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right ) \\boldsymbol{\\gamma }_{x} \\\\  &  + \\left ( - B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right ) \\boldsymbol{\\gamma }_{y} \\\\  &  + \\left ( B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right ) \\boldsymbol{\\gamma }_{z} \\\\  &  + \\left ( - B^{z} \\omega  - E^{x} k_{y} + E^{y} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\  &  + \\left ( B^{y} \\omega  - E^{x} k_{z} + E^{z} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  + \\left ( - B^{x} \\omega  - E^{y} k_{z} + E^{z} k_{y}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\  &  + \\left ( - B^{x} k_{x} - B^{y} k_{y} - B^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{set } e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0\\mbox{ and } e_{E}\\cdot e_{E} = e_{B}\\cdot e_{B} = e_{k}\\cdot e_{k} = -e_{t}\\cdot e_{t} = 1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}-1 & \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & 0 & 0\\\\\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & -1 & 0 & 0\\\\0 & 0 & -1 & 0\\\\0 & 0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} K\\cdot X = - k x_{k} + \\omega  t \\end{equation*}\n",
       "\\begin{equation*} F = - \\frac{B e^{- i \\left(k x_{k} - \\omega  t\\right)}}{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k} + E e^{i \\left(- k x_{k} + \\omega  t\\right)} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{t} - \\frac{\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  B e^{- i \\left(k x_{k} - \\omega  t\\right)}}{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k} \\end{equation*}\n",
       "\\begin{equation*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 =  \\begin{aligned}[t]  & \\left ( - \\frac{B k}{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\  &  - \\frac{\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  B k}{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} \\boldsymbol{e}_{B} \\\\  &  + \\left ( - \\frac{B \\omega }{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\\\  &  - \\frac{\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  B \\omega }{\\sqrt{1 - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2}}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Previous equation requires that: }e_{E}\\cdot e_{B} = 0\\mbox{ if }B\\ne 0\\mbox{ and }k\\ne 0 \\end{equation*}\n",
       "\\begin{equation*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 =  \\begin{aligned}[t]  & \\left ( - B k - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\  &  + \\left ( - B \\omega  - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} 0 = - B k - E \\omega \\end{equation*}\n",
       "\\begin{equation*} 0 = - B \\omega  - E k \\end{equation*}\n",
       "\\begin{equation*} \\mbox{eq3 = eq1-eq2: }0 = \\frac{E k}{\\omega } - \\frac{E \\omega }{k} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{eq3 = (eq1-eq2)/E: }0 = \\frac{k}{\\omega } - \\frac{\\omega }{k} \\end{equation*}\n",
       "\\begin{equation*} k = \\left[\\begin{array}{c}- \\omega \\\\\\omega \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} B = \\left[\\begin{array}{c}- E\\\\E\\end{array}\\right] \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('em_waves_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={6in,7in},total={5in,6in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\begin{array}{c} \\left [ f , \\right. \\\\  F^{x}  \\boldsymbol{e}_{x} + F^{y}  \\boldsymbol{e}_{y} + F^{z}  \\boldsymbol{e}_{z}, \\\\ \\left. B^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}\\right ] \\\\ \\end{array} \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\begin{array}{ccc} f , & F^{x}  \\boldsymbol{e}_{x} + F^{y}  \\boldsymbol{e}_{y} + F^{z}  \\boldsymbol{e}_{z}, & B^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}\\\\ \\end{array} \\right ] \\end{equation*}\n",
       "\\begin{equation*} \\begin{aligned}[t]  & F^{x}  \\boldsymbol{e}_{x} \\\\  &  + F^{y}  \\boldsymbol{e}_{y} \\\\  &  + F^{z}  \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} \\begin{aligned}[t]  & B^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\  &  + B^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\  &  + B^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} \\nabla^{2} = \\nabla\\cdot\\nabla = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}\n",
       "\\begin{equation*} \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} + \\boldsymbol{e}_{x} \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('FmtChk')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={8.5in,11in},total={7.5in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def Product_of_Rotors():\n",
       "    Print_Function()\n",
       "    (na,nb,nm,alpha,th,th_a,th_b) = symbols('n_a n_b n_m alpha theta theta_a theta_b',\\\n",
       "                                    real = True)\n",
       "    g = [[na, 0, alpha],[0, nm, 0],[alpha, 0, nb]] #metric tensor\n",
       "    \"\"\"\n",
       "    Values of metric tensor components\n",
       "    [na,nm,nb] = [+1/-1,+1/-1,+1/-1]  alpha = ea|eb\n",
       "    \"\"\"\n",
       "    (g3d, ea, em, eb) = Ga.build('e_a e_m e_b', g=g)\n",
       "    print('g =',g3d.g)\n",
       "    print(r'%n_{a} = \\bm{e}_{a}^{2}\\;\\;n_{b} = \\bm{e}_{b}^{2}\\;\\;n_{m} = \\bm{e}_{m}^{2}'+\\\n",
       "        r'\\;\\;\\alpha = \\bm{e}_{a}\\cdot\\bm{e}_{b}')\n",
       "    (ca,cb,sa,sb) = symbols('c_a c_b s_a s_b',real=True)\n",
       "    Ra = ca + sa*ea*em  # Rotor for ea^em plane\n",
       "    Rb = cb + sb*em*eb  # Rotor for em^eb plane\n",
       "    print(r'%\\mbox{Rotor in }\\bm{e}_{a}\\bm{e}_{m}\\mbox{ plane } R_{a} =',Ra)\n",
       "    print(r'%\\mbox{Rotor in }\\bm{e}_{m}\\bm{e}_{b}\\mbox{ plane } R_{b} =',Rb)\n",
       "    Rab = Ra*Rb  # Compound Rotor\n",
       "    \"\"\"\n",
       "    Show that compound rotor is scalar plus bivector\n",
       "    \"\"\"\n",
       "    print(r'%R_{a}R_{b} = S+\\bm{B} =', Rab)\n",
       "    Rab2 = Rab.get_grade(2)\n",
       "    print(r'%\\bm{B} =',Rab2)\n",
       "    Rab2sq = Rab2*Rab2  # Square of compound rotor bivector part\n",
       "    Ssq = (Rab.scalar())**2  # Square of compound rotor scalar part\n",
       "    Bsq =  Rab2sq.scalar()\n",
       "    print(r'%S^{2} =',Ssq)\n",
       "    print(r'%\\bm{B}^{2} =',Bsq)\n",
       "    Dsq = (Ssq-Bsq).expand().simplify()\n",
       "    print('%S^{2}-B^{2} =', Dsq)\n",
       "    Dsq = Dsq.subs(nm**2,S(1))  # (e_m)**4 = 1\n",
       "    print('%S^{2}-B^{2} =', Dsq)\n",
       "    Cases = [S(-1),S(1)]  # -1/+1 squares for each basis vector\n",
       "    print(r'#Consider all combinations of $\\bm{e}_{a}^{2}$, $\\bm{e}_{b}^{2}$'+\\\n",
       "          r' and $\\bm{e}_{m}^2$:')\n",
       "    for Na in Cases:\n",
       "        for Nb in Cases:\n",
       "            for Nm in Cases:\n",
       "                Ba_sq = -Na*Nm\n",
       "                Bb_sq = -Nb*Nm\n",
       "                if Ba_sq < 0:\n",
       "                    Ca_th = cos(th_a)\n",
       "                    Sa_th = sin(th_a)\n",
       "                else:\n",
       "                    Ca_th = cosh(th_a)\n",
       "                    Sa_th = sinh(th_a)\n",
       "                if Bb_sq < 0:\n",
       "                    Cb_th = cos(th_b)\n",
       "                    Sb_th = sin(th_b)\n",
       "                else:\n",
       "                    Cb_th = cosh(th_b)\n",
       "                    Sb_th = sinh(th_b)\n",
       "                print(r'%\\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] =',\\\n",
       "                      [Na,Nb,Nm])\n",
       "                Dsq_tmp = Dsq.subs({ca:Ca_th,sa:Sa_th,cb:Cb_th,sb:Sb_th,na:Na,nb:Nb,nm:Nm})\n",
       "                print(r'%S^{2}-\\bm{B}^{2} =',Dsq_tmp,' =',trigsimp(Dsq_tmp))\n",
       "    print(r'#Thus we have shown that $R_{a}R_{b} = S+\\bm{D} = e^{\\bm{C}}$ where $\\bm{C}$'+\\\n",
       "          r' is a bivector blade.')\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}n_{a} & 0 & \\alpha \\\\0 & n_{m} & 0\\\\\\alpha  & 0 & n_{b}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} n_{a} = \\bm{e}_{a}^{2}\\;\\;n_{b} = \\bm{e}_{b}^{2}\\;\\;n_{m} = \\bm{e}_{m}^{2}\\;\\;\\alpha = \\bm{e}_{a}\\cdot\\bm{e}_{b} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Rotor in }\\bm{e}_{a}\\bm{e}_{m}\\mbox{ plane } R_{a} = c_{a}  + s_{a} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{m} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Rotor in }\\bm{e}_{m}\\bm{e}_{b}\\mbox{ plane } R_{b} = c_{b}  + s_{b} \\boldsymbol{e}_{m}\\wedge \\boldsymbol{e}_{b} \\end{equation*}\n",
       "\\begin{equation*} R_{a}R_{b} = S+\\bm{B} = \\left ( \\alpha  n_{m} s_{a} s_{b} + c_{a} c_{b}\\right )  + c_{b} s_{a} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{m} + n_{m} s_{a} s_{b} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{b} + c_{a} s_{b} \\boldsymbol{e}_{m}\\wedge \\boldsymbol{e}_{b} \\end{equation*}\n",
       "\\begin{equation*} \\bm{B} = c_{b} s_{a} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{m} + n_{m} s_{a} s_{b} \\boldsymbol{e}_{a}\\wedge \\boldsymbol{e}_{b} + c_{a} s_{b} \\boldsymbol{e}_{m}\\wedge \\boldsymbol{e}_{b} \\end{equation*}\n",
       "\\begin{equation*} S^{2} = \\left(\\alpha  n_{m} s_{a} s_{b} + c_{a} c_{b}\\right)^{2} \\end{equation*}\n",
       "\\begin{equation*} \\bm{B}^{2} = \\alpha ^{2} {\\left ( n_{m} \\right )}^{2} {\\left ( s_{a} \\right )}^{2} {\\left ( s_{b} \\right )}^{2} + 2 \\alpha  c_{a} c_{b} n_{m} s_{a} s_{b} - {\\left ( c_{a} \\right )}^{2} n_{b} n_{m} {\\left ( s_{b} \\right )}^{2} - {\\left ( c_{b} \\right )}^{2} n_{a} n_{m} {\\left ( s_{a} \\right )}^{2} - n_{a} n_{b} {\\left ( n_{m} \\right )}^{2} {\\left ( s_{a} \\right )}^{2} {\\left ( s_{b} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} S^{2}-B^{2} = {\\left ( c_{a} \\right )}^{2} {\\left ( c_{b} \\right )}^{2} + {\\left ( c_{a} \\right )}^{2} n_{b} n_{m} {\\left ( s_{b} \\right )}^{2} + {\\left ( c_{b} \\right )}^{2} n_{a} n_{m} {\\left ( s_{a} \\right )}^{2} + n_{a} n_{b} {\\left ( n_{m} \\right )}^{2} {\\left ( s_{a} \\right )}^{2} {\\left ( s_{b} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} S^{2}-B^{2} = {\\left ( c_{a} \\right )}^{2} {\\left ( c_{b} \\right )}^{2} + {\\left ( c_{a} \\right )}^{2} n_{b} n_{m} {\\left ( s_{b} \\right )}^{2} + {\\left ( c_{b} \\right )}^{2} n_{a} n_{m} {\\left ( s_{a} \\right )}^{2} + n_{a} n_{b} {\\left ( s_{a} \\right )}^{2} {\\left ( s_{b} \\right )}^{2} \\end{equation*}\n",
       "Consider all combinations of $\\bm{e}_{a}^{2}$, $\\bm{e}_{b}^{2}$ and $\\bm{e}_{m}^2$:\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [-1, -1, -1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\sin{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\cos{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\cos{\\left (\\theta _{a} \\right )}}^{2} + {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\cos{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [-1, -1, 1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = {\\sinh{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} - {\\sinh{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2} - {\\sinh{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2} + {\\cosh{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [-1, 1, -1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = - {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2} - {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} + {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [-1, 1, 1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = - {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\sinh{\\left (\\theta _{a} \\right )}}^{2} + {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2} - {\\cos{\\left (\\theta _{b} \\right )}}^{2} {\\sinh{\\left (\\theta _{a} \\right )}}^{2} + {\\cos{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [1, -1, -1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = - {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\sinh{\\left (\\theta _{a} \\right )}}^{2} + {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2} - {\\cos{\\left (\\theta _{b} \\right )}}^{2} {\\sinh{\\left (\\theta _{a} \\right )}}^{2} + {\\cos{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [1, -1, 1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = - {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2} - {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} + {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [1, 1, -1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = {\\sinh{\\left (\\theta _{a} \\right )}}^{2} {\\sinh{\\left (\\theta _{b} \\right )}}^{2} - {\\sinh{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2} - {\\sinh{\\left (\\theta _{b} \\right )}}^{2} {\\cosh{\\left (\\theta _{a} \\right )}}^{2} + {\\cosh{\\left (\\theta _{a} \\right )}}^{2} {\\cosh{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "\\begin{equation*} \\left [ \\bm{e}_{a}^{2},\\bm{e}_{b}^{2},\\bm{e}_{m}^2\\right ] = [1, 1, 1] \\end{equation*}\n",
       "\\begin{equation*} S^{2}-\\bm{B}^{2} = {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\sin{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{a} \\right )}}^{2} {\\cos{\\left (\\theta _{b} \\right )}}^{2} + {\\sin{\\left (\\theta _{b} \\right )}}^{2} {\\cos{\\left (\\theta _{a} \\right )}}^{2} + {\\cos{\\left (\\theta _{a} \\right )}}^{2} {\\cos{\\left (\\theta _{b} \\right )}}^{2}  = 1 \\end{equation*}\n",
       "Thus we have shown that $R_{a}R_{b} = S+\\bm{D} = e^{\\bm{C}}$ where $\\bm{C}$ is a bivector blade.\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('groups')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def basic_multivector_operations_3D():\n",
       "    Print_Function()\n",
       "    g3d = Ga('e*x|y|z')\n",
       "    (ex,ey,ez) = g3d.mv()\n",
       "    A = g3d.mv('A','mv')\n",
       "    print(A.Fmt(1,'A'))\n",
       "    print(A.Fmt(2,'A'))\n",
       "    print(A.Fmt(3,'A'))\n",
       "    print(A.even().Fmt(1,'%A_{+}'))\n",
       "    print(A.odd().Fmt(1,'%A_{-}'))\n",
       "    X = g3d.mv('X','vector')\n",
       "    Y = g3d.mv('Y','vector')\n",
       "    print('g_{ij} = ',g3d.g)\n",
       "    print(X.Fmt(1,'X'))\n",
       "    print(Y.Fmt(1,'Y'))\n",
       "    print((X*Y).Fmt(2,'X*Y'))\n",
       "    print((X^Y).Fmt(2,'X^Y'))\n",
       "    print((X|Y).Fmt(2,'X|Y'))\n",
       "    print(cross(X,Y).Fmt(1,r'X\\times Y'))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} A = A  + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} A =  \\begin{aligned}[t]  & A  \\\\  &  + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\  &  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} A =  \\begin{aligned}[t]  & A  \\\\  &  + A^{x} \\boldsymbol{e}_{x} \\\\  &  + A^{y} \\boldsymbol{e}_{y} \\\\  &  + A^{z} \\boldsymbol{e}_{z} \\\\  &  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\  &  + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} A_{+} = A  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} A_{-} = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} g_{ij} =  \\left[\\begin{array}{ccc}\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  & \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X Y =  \\begin{aligned}[t]  & \\left ( \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{y} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} + \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{z}\\right )  \\\\  &  + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} X\\W Y = \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X\\cdot Y = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{y} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} + \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{z} \\end{equation*}\n",
       "\\begin{equation*} X\\times Y = \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{y} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} - \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} - \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} X^{y} Y^{z} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} X^{z} Y^{y}}{\\sqrt{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2} \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right ) }} \\boldsymbol{e}_{x} + \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{y} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} X^{x} Y^{z} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} X^{z} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y}}{\\sqrt{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2} \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right ) }} \\boldsymbol{e}_{y} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2} X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2} X^{y} Y^{x} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{z} Y^{y}}{\\sqrt{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2} \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) ^{2} \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right ) }} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def basic_multivector_operations_2D():\n",
       "    Print_Function()\n",
       "    g2d = Ga('e*x|y')\n",
       "    (ex,ey) = g2d.mv()\n",
       "    print('g_{ij} =',g2d.g)\n",
       "    X = g2d.mv('X','vector')\n",
       "    A = g2d.mv('A','spinor')\n",
       "    print(X.Fmt(1,'X'))\n",
       "    print(A.Fmt(1,'A'))\n",
       "    print((X|A).Fmt(2,'X|A'))\n",
       "    print((X<A).Fmt(2,'X<A'))\n",
       "    print((A>X).Fmt(2,'A>X'))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{cc}\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A = A  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\cdot A = - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} + A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\rfloor A = - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} + A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A\\lfloor X = A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def basic_multivector_operations_2D_orthogonal():\n",
       "    Print_Function()\n",
       "    o2d = Ga('e*x|y',g=[1,1])\n",
       "    (ex,ey) = o2d.mv()\n",
       "    print('g_{ii} =',o2d.g)\n",
       "    X = o2d.mv('X','vector')\n",
       "    A = o2d.mv('A','spinor')\n",
       "    print(X.Fmt(1,'X'))\n",
       "    print(A.Fmt(1,'A'))\n",
       "    print((X*A).Fmt(2,'X*A'))\n",
       "    print((X|A).Fmt(2,'X|A'))\n",
       "    print((X<A).Fmt(2,'X<A'))\n",
       "    print((X>A).Fmt(2,'X>A'))\n",
       "    print((A*X).Fmt(2,'A*X'))\n",
       "    print((A|X).Fmt(2,'A|X'))\n",
       "    print((A<X).Fmt(2,'A<X'))\n",
       "    print((A>X).Fmt(2,'A>X'))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ii} = \\left[\\begin{array}{cc}1 & 0\\\\0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A = A  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X A = \\left ( A X^{x} - A^{xy} X^{y}\\right ) \\boldsymbol{e}_{x} + \\left ( A X^{y} + A^{xy} X^{x}\\right ) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\cdot A = - A^{xy} X^{y} \\boldsymbol{e}_{x} + A^{xy} X^{x} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\rfloor A = - A^{xy} X^{y} \\boldsymbol{e}_{x} + A^{xy} X^{x} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\lfloor A = A X^{x} \\boldsymbol{e}_{x} + A X^{y} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A X = \\left ( A X^{x} + A^{xy} X^{y}\\right ) \\boldsymbol{e}_{x} + \\left ( A X^{y} - A^{xy} X^{x}\\right ) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A\\cdot X = A^{xy} X^{y} \\boldsymbol{e}_{x} - A^{xy} X^{x} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A\\rfloor X = A X^{x} \\boldsymbol{e}_{x} + A X^{y} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A\\lfloor X = A^{xy} X^{y} \\boldsymbol{e}_{x} - A^{xy} X^{x} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def check_generalized_BAC_CAB_formulas():\n",
       "    Print_Function()\n",
       "    g4d = Ga('a b c d e')\n",
       "    (a,b,c,d,e) = g4d.mv()\n",
       "    print('g_{ij} =',g4d.g)\n",
       "    print('\\\\bm{a|(b*c)} =',a|(b*c))\n",
       "    print('\\\\bm{a|(b^c)} =',a|(b^c))\n",
       "    print('\\\\bm{a|(b^c^d)} =',a|(b^c^d))\n",
       "    print('\\\\bm{a|(b^c)+c|(a^b)+b|(c^a)} =',(a|(b^c))+(c|(a^b))+(b|(c^a)))\n",
       "    print('\\\\bm{a*(b^c)-b*(a^c)+c*(a^b)} =',a*(b^c)-b*(a^c)+c*(a^b))\n",
       "    print('\\\\bm{a*(b^c^d)-b*(a^c^d)+c*(a^b^d)-d*(a^b^c)} =',a*(b^c^d)-b*(a^c^d)+c*(a^b^d)-d*(a^b^c))\n",
       "    print('\\\\bm{(a^b)|(c^d)} =',(a^b)|(c^d))\n",
       "    print('\\\\bm{((a^b)|c)|d} =',((a^b)|c)|d)\n",
       "    print('\\\\bm{(a^b)\\\\times (c^d)} =',Ga.com(a^b,c^d))\n",
       "    print('\\\\bm{(a^b^c)(d^e)} =',((a^b^c)*(d^e)).Fmt(2))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccccc}\\left (\\boldsymbol{a}\\cdot \\boldsymbol{a}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{d}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{d}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{e}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{e}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{e}\\right )  & \\left (\\boldsymbol{d}\\cdot \\boldsymbol{e}\\right )  & \\left (\\boldsymbol{e}\\cdot \\boldsymbol{e}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b c)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c\\W d)} = \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c} - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c)+c\\cdot (a\\W b)+b\\cdot (c\\W a)} =  0 \\end{equation*}\n",
       "\\begin{equation*} \\bm{a (b\\W c)-b (a\\W c)+c (a\\W b)} = 3 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a (b\\W c\\W d)-b (a\\W c\\W d)+c (a\\W b\\W d)-d (a\\W b\\W c)} = 4 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} \\bm{(a\\W b)\\cdot (c\\W d)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\bm{((a\\W b)\\cdot c)\\cdot d} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\bm{(a\\W b)\\times (c\\W d)} = - \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{c} + \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c} - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} \\bm{(a\\W b\\W c)(d\\W e)} =  \\begin{aligned}[t]  & \\left ( - \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{c}\\cdot \\boldsymbol{e}\\right )  + \\left (\\boldsymbol{b}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right ) \\right ) \\boldsymbol{a} + \\left ( \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{c}\\cdot \\boldsymbol{e}\\right )  - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right ) \\right ) \\boldsymbol{b} + \\left ( - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{e}\\right )  + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right ) \\right ) \\boldsymbol{c} \\\\  &  - \\left (\\boldsymbol{c}\\cdot \\boldsymbol{e}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{e} + \\left (\\boldsymbol{b}\\cdot \\boldsymbol{e}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} - \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{e}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} \\\\  &  + \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d}\\wedge \\boldsymbol{e}  \\end{aligned} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def rounding_numerical_components():\n",
       "    Print_Function()\n",
       "    o3d = Ga('e_x e_y e_z',g=[1,1,1])\n",
       "    (ex,ey,ez) = o3d.mv()\n",
       "    X = 1.2*ex+2.34*ey+0.555*ez\n",
       "    Y = 0.333*ex+4*ey+5.3*ez\n",
       "    print('X =',X)\n",
       "    print('Nga(X,2) =',Nga(X,2))\n",
       "    print('X*Y =',X*Y)\n",
       "    print('Nga(X*Y,2) =',Nga(X*Y,2))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} X = 1.2 \\boldsymbol{e}_{x} + 2.34 \\boldsymbol{e}_{y} + 0.555 \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} Nga(X,2) = 1.2 \\boldsymbol{e}_{x} + 2.3 \\boldsymbol{e}_{y} + 0.55 \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X Y = 12.7011  + 4.02078 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6.175185 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10.182 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} Nga(X Y,2) = 13.0  + 4.0 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6.2 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10.0 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def derivatives_in_rectangular_coordinates():\n",
       "    Print_Function()\n",
       "    X = (x,y,z) = symbols('x y z')\n",
       "    o3d = Ga('e_x e_y e_z',g=[1,1,1],coords=X)\n",
       "    (ex,ey,ez) = o3d.mv()\n",
       "    grad = o3d.grad\n",
       "    f = o3d.mv('f','scalar',f=True)\n",
       "    A = o3d.mv('A','vector',f=True)\n",
       "    B = o3d.mv('B','bivector',f=True)\n",
       "    C = o3d.mv('C','mv')\n",
       "    print('f =',f)\n",
       "    print('A =',A)\n",
       "    print('B =',B)\n",
       "    print('C =',C)\n",
       "    print('grad*f =',grad*f)\n",
       "    print('grad|A =',grad|A)\n",
       "    print('grad*A =',grad*A)\n",
       "    print('-I*(grad^A) =',-o3d.I()*(grad^A))\n",
       "    print('grad*B =',grad*B)\n",
       "    print('grad^B =',grad^B)\n",
       "    print('grad|B =',grad|B)\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} A = A^{x}  \\boldsymbol{e}_{x} + A^{y}  \\boldsymbol{e}_{y} + A^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} B = B^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} C = C  + C^{x} \\boldsymbol{e}_{x} + C^{y} \\boldsymbol{e}_{y} + C^{z} \\boldsymbol{e}_{z} + C^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + C^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + C^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + C^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{x} f  \\boldsymbol{e}_{x} + \\partial_{y} f  \\boldsymbol{e}_{y} + \\partial_{z} f  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  A = \\left ( \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\right )  + \\left ( - \\partial_{y} A^{x}  + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x}  + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y}  + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W A) = \\left ( - \\partial_{z} A^{y}  + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{z} A^{x}  - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - \\partial_{y} A^{x}  + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  B = \\left ( - \\partial_{y} B^{xy}  - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy}  - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz}  + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} + \\left ( \\partial_{z} B^{xy}  - \\partial_{y} B^{xz}  + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\partial_{z} B^{xy}  - \\partial_{y} B^{xz}  + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot B = \\left ( - \\partial_{y} B^{xy}  - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy}  - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz}  + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def derivatives_in_spherical_coordinates():\n",
       "    Print_Function()\n",
       "    X = (r,th,phi) = symbols('r theta phi')\n",
       "    s3d = Ga('e_r e_theta e_phi',g=[1,r**2,r**2*sin(th)**2],coords=X,norm=True)\n",
       "    (er,eth,ephi) = s3d.mv()\n",
       "    grad = s3d.grad\n",
       "    f = s3d.mv('f','scalar',f=True)\n",
       "    A = s3d.mv('A','vector',f=True)\n",
       "    B = s3d.mv('B','bivector',f=True)\n",
       "    print('f =',f)\n",
       "    print('A =',A)\n",
       "    print('B =',B)\n",
       "    print('grad*f =',grad*f)\n",
       "    print('grad|A =',grad|A)\n",
       "    print('-I*(grad^A) =',(-s3d.E()*(grad^A)).simplify())\n",
       "    print('grad^B =',grad^B)\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} A = A^{r}  \\boldsymbol{e}_{r} + A^{\\theta }  \\boldsymbol{e}_{\\theta } + A^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = B^{r\\theta }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + B^{r\\phi }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + B^{\\theta \\phi }  \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{r} f  \\boldsymbol{e}_{r} + \\frac{\\partial_{\\theta } f }{r} \\boldsymbol{e}_{\\theta } + \\frac{\\partial_{\\phi } f }{r \\sin{\\left (\\theta  \\right )}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{r \\partial_{r} A^{r}  + 2 A^{r}  + \\frac{A^{\\theta } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } A^{\\theta }  + \\frac{\\partial_{\\phi } A^{\\phi } }{\\sin{\\left (\\theta  \\right )}}}{r} \\end{equation*}\n",
       "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W A) = \\frac{\\frac{A^{\\phi } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } A^{\\phi }  - \\frac{\\partial_{\\phi } A^{\\theta } }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{- r \\partial_{r} A^{\\phi }  - A^{\\phi }  + \\frac{\\partial_{\\phi } A^{r} }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} A^{\\theta }  + A^{\\theta }  - \\partial_{\\theta } A^{r} }{r} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\frac{r \\partial_{r} B^{\\theta \\phi }  - \\frac{B^{r\\phi } }{\\tan{\\left (\\theta  \\right )}} + 2 B^{\\theta \\phi }  - \\partial_{\\theta } B^{r\\phi }  + \\frac{\\partial_{\\phi } B^{r\\theta } }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def noneuclidian_distance_calculation():\n",
       "    Print_Function()\n",
       "    from sympy import solve,sqrt\n",
       "    Fmt(1)\n",
       "    g = '0 # #,# 0 #,# # 1'\n",
       "    nel = Ga('X Y e',g=g)\n",
       "    (X,Y,e) = nel.mv()\n",
       "    print('g_{ij} =',nel.g)\n",
       "    print('%(X\\\\W Y)^{2} =',(X^Y)*(X^Y))\n",
       "    L = X^Y^e\n",
       "    B = L*e # D&L 10.152\n",
       "    Bsq = (B*B).scalar()\n",
       "    print('#%L = X\\\\W Y\\\\W e \\\\text{ is a non-euclidian line}')\n",
       "    print('B = L*e =',B)\n",
       "    BeBr =B*e*B.rev()\n",
       "    print('%BeB^{\\\\dagger} =',BeBr)\n",
       "    print('%B^{2} =',B*B)\n",
       "    print('%L^{2} =',L*L) # D&L 10.153\n",
       "    (s,c,Binv,M,S,C,alpha) = symbols('s c (1/B) M S C alpha')\n",
       "    XdotY = nel.g[0,1]\n",
       "    Xdote = nel.g[0,2]\n",
       "    Ydote = nel.g[1,2]\n",
       "    Bhat = Binv*B # D&L 10.154\n",
       "    R = c+s*Bhat # Rotor R = exp(alpha*Bhat/2)\n",
       "    print('#%s = \\\\f{\\\\sinh}{\\\\alpha/2} \\\\text{ and } c = \\\\f{\\\\cosh}{\\\\alpha/2}')\n",
       "    print('%e^{\\\\alpha B/{2\\\\abs{B}}} =',R)\n",
       "    Z = R*X*R.rev() # D&L 10.155\n",
       "    Z.obj = expand(Z.obj)\n",
       "    Z.obj = Z.obj.collect([Binv,s,c,XdotY])\n",
       "    Z.Fmt(3,'%RXR^{\\\\dagger}')\n",
       "    W = Z|Y # Extract scalar part of multivector\n",
       "    # From this point forward all calculations are with sympy scalars\n",
       "    #print '#Objective is to determine value of C = cosh(alpha) such that W = 0'\n",
       "    W = W.scalar()\n",
       "    print('%W = Z\\\\cdot Y =',W)\n",
       "    W = expand(W)\n",
       "    W = simplify(W)\n",
       "    W = W.collect([s*Binv])\n",
       "    M = 1/Bsq\n",
       "    W = W.subs(Binv**2,M)\n",
       "    W = simplify(W)\n",
       "    Bmag = sqrt(XdotY**2-2*XdotY*Xdote*Ydote)\n",
       "    W = W.collect([Binv*c*s,XdotY])\n",
       "    #Double angle substitutions\n",
       "    W = W.subs(2*XdotY**2-4*XdotY*Xdote*Ydote,2/(Binv**2))\n",
       "    W = W.subs(2*c*s,S)\n",
       "    W = W.subs(c**2,(C+1)/2)\n",
       "    W = W.subs(s**2,(C-1)/2)\n",
       "    W = simplify(W)\n",
       "    W = W.subs(Binv,1/Bmag)\n",
       "    W = expand(W)\n",
       "    print('#%S = \\\\f{\\\\sinh}{\\\\alpha} \\\\text{ and } C = \\\\f{\\\\cosh}{\\\\alpha}')\n",
       "    print('W =',W)\n",
       "    Wd = collect(W,[C,S],exact=True,evaluate=False)\n",
       "    Wd_1 = Wd[one]\n",
       "    Wd_C = Wd[C]\n",
       "    Wd_S = Wd[S]\n",
       "    print('%\\\\text{Scalar Coefficient} =',Wd_1)\n",
       "    print('%\\\\text{Cosh Coefficient} =',Wd_C)\n",
       "    print('%\\\\text{Sinh Coefficient} =',Wd_S)\n",
       "    print('%\\\\abs{B} =',Bmag)\n",
       "    Wd_1 = Wd_1.subs(Bmag,1/Binv)\n",
       "    Wd_C = Wd_C.subs(Bmag,1/Binv)\n",
       "    Wd_S = Wd_S.subs(Bmag,1/Binv)\n",
       "    lhs = Wd_1+Wd_C*C\n",
       "    rhs = -Wd_S*S\n",
       "    lhs = lhs**2\n",
       "    rhs = rhs**2\n",
       "    W = expand(lhs-rhs)\n",
       "    W = expand(W.subs(1/Binv**2,Bmag**2))\n",
       "    W = expand(W.subs(S**2,C**2-1))\n",
       "    W = W.collect([C,C**2],evaluate=False)\n",
       "    a = simplify(W[C**2])\n",
       "    b = simplify(W[C])\n",
       "    c = simplify(W[one])\n",
       "    print('#%\\\\text{Require } aC^{2}+bC+c = 0')\n",
       "    print('a =',a)\n",
       "    print('b =',b)\n",
       "    print('c =',c)\n",
       "    x = Symbol('x')\n",
       "    C =  solve(a*x**2+b*x+c,x)[0]\n",
       "    print('%b^{2}-4ac =',simplify(b**2-4*a*c))\n",
       "    print('%\\\\f{\\\\cosh}{\\\\alpha} = C = -b/(2a) =',expand(simplify(expand(C))))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccc}0 & \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  & \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  & 0 & \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\\\\\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  & \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} (X\\W Y)^{2} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} \\end{equation*}\n",
       "\\begin{equation*} L = X\\W Y\\W e \\text{ is a non-euclidian line} \\end{equation*}\n",
       "\\begin{equation*} B = L e =  \\boldsymbol{X}\\wedge \\boldsymbol{Y} - \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  \\boldsymbol{X}\\wedge \\boldsymbol{e} + \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\boldsymbol{Y}\\wedge \\boldsymbol{e} \\end{equation*}\n",
       "\\begin{equation*} BeB^{\\dagger} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left(- \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  + 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\right) \\boldsymbol{e} \\end{equation*}\n",
       "\\begin{equation*} B^{2} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left(\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\right) \\end{equation*}\n",
       "\\begin{equation*} L^{2} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left(\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\right) \\end{equation*}\n",
       "\\begin{equation*} s = \\f{\\sinh}{\\alpha/2} \\text{ and } c = \\f{\\cosh}{\\alpha/2} \\end{equation*}\n",
       "\\begin{equation*} e^{\\alpha B/{2\\abs{B}}} = c  + (1/B) s \\boldsymbol{X}\\wedge \\boldsymbol{Y} - \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  (1/B) s \\boldsymbol{X}\\wedge \\boldsymbol{e} + \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  (1/B) s \\boldsymbol{Y}\\wedge \\boldsymbol{e} \\end{equation*}\n",
       "\\begin{equation*} W = Z\\cdot Y = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{3} (1/B)^{2} s^{2} - 4 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  (1/B)^{2} s^{2} + 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} (1/B) c s + 4 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right ) ^{2} \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) ^{2} (1/B)^{2} s^{2} - 4 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  (1/B) c s + \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  c^{2} \\end{equation*}\n",
       "\\begin{equation*} S = \\f{\\sinh}{\\alpha} \\text{ and } C = \\f{\\cosh}{\\alpha} \\end{equation*}\n",
       "\\begin{equation*} W = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  C - \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  C + \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  + S \\sqrt{\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) } \\end{equation*}\n",
       "\\begin{equation*} \\text{Scalar Coefficient} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\text{Cosh Coefficient} = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  - \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\text{Sinh Coefficient} = \\sqrt{\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) } \\end{equation*}\n",
       "\\begin{equation*} \\abs{B} = \\sqrt{\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) } \\end{equation*}\n",
       "\\begin{equation*} \\text{Require } aC^{2}+bC+c = 0 \\end{equation*}\n",
       "\\begin{equation*} a = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right ) ^{2} \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) ^{2} \\end{equation*}\n",
       "\\begin{equation*} b = 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  \\left(\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  - \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) \\right) \\end{equation*}\n",
       "\\begin{equation*} c = \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) ^{2} - 2 \\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right )  \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right )  + \\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right ) ^{2} \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) ^{2} \\end{equation*}\n",
       "\\begin{equation*} b^{2}-4ac = 0 \\end{equation*}\n",
       "\\begin{equation*} \\f{\\cosh}{\\alpha} = C = -b/(2a) = - \\frac{\\left (\\boldsymbol{X}\\cdot \\boldsymbol{Y}\\right ) }{\\left (\\boldsymbol{X}\\cdot \\boldsymbol{e}\\right )  \\left (\\boldsymbol{Y}\\cdot \\boldsymbol{e}\\right ) } + 1 \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def conformal_representations_of_circles_lines_spheres_and_planes():\n",
       "    Print_Function()\n",
       "    global n,nbar\n",
       "    Fmt(1)\n",
       "    g = '1 0 0 0 0,0 1 0 0 0,0 0 1 0 0,0 0 0 0 2,0 0 0 2 0'\n",
       "    c3d = Ga('e_1 e_2 e_3 n \\\\bar{n}',g=g)\n",
       "    (e1,e2,e3,n,nbar) = c3d.mv()\n",
       "    print('g_{ij} =',c3d.g)\n",
       "    e = n+nbar\n",
       "    #conformal representation of points\n",
       "    A = make_vector(e1, ga=c3d)    # point a = (1,0,0)  A = F(a)\n",
       "    B = make_vector(e2, ga=c3d)    # point b = (0,1,0)  B = F(b)\n",
       "    C = make_vector(-e1, ga=c3d)   # point c = (-1,0,0) C = F(c)\n",
       "    D = make_vector(e3, ga=c3d)    # point d = (0,0,1)  D = F(d)\n",
       "    X = make_vector('x',3, ga=c3d)\n",
       "    print('F(a) =',A)\n",
       "    print('F(b) =',B)\n",
       "    print('F(c) =',C)\n",
       "    print('F(d) =',D)\n",
       "    print('F(x) =',X)\n",
       "    print('#a = e1, b = e2, c = -e1, and d = e3')\n",
       "    print('#A = F(a) = 1/2*(a*a*n+2*a-nbar), etc.')\n",
       "    print('#Circle through a, b, and c')\n",
       "    print('Circle: A^B^C^X = 0 =',(A^B^C^X))\n",
       "    print('#Line through a and b')\n",
       "    print('Line  : A^B^n^X = 0 =',(A^B^n^X))\n",
       "    print('#Sphere through a, b, c, and d')\n",
       "    print('Sphere: A^B^C^D^X = 0 =',(((A^B)^C)^D)^X)\n",
       "    print('#Plane through a, b, and d')\n",
       "    print('Plane : A^B^n^D^X = 0 =',(A^B^n^D^X))\n",
       "    L = (A^B^e)^X\n",
       "    L.Fmt(3,'Hyperbolic\\\\;\\\\; Circle: (A^B^e)^X = 0')\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccccc}1 & 0 & 0 & 0 & 0\\\\0 & 1 & 0 & 0 & 0\\\\0 & 0 & 1 & 0 & 0\\\\0 & 0 & 0 & 0 & 2\\\\0 & 0 & 0 & 2 & 0\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} F(a) =  \\boldsymbol{e}_{1} + \\frac{1}{2} \\boldsymbol{n} - \\frac{1}{2} \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "\\begin{equation*} F(b) =  \\boldsymbol{e}_{2} + \\frac{1}{2} \\boldsymbol{n} - \\frac{1}{2} \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "\\begin{equation*} F(c) = - \\boldsymbol{e}_{1} + \\frac{1}{2} \\boldsymbol{n} - \\frac{1}{2} \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "\\begin{equation*} F(d) =  \\boldsymbol{e}_{3} + \\frac{1}{2} \\boldsymbol{n} - \\frac{1}{2} \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "\\begin{equation*} F(x) = x_{1} \\boldsymbol{e}_{1} + x_{2} \\boldsymbol{e}_{2} + x_{3} \\boldsymbol{e}_{3} + \\left ( \\frac{{\\left ( x_{1} \\right )}^{2}}{2} + \\frac{{\\left ( x_{2} \\right )}^{2}}{2} + \\frac{{\\left ( x_{3} \\right )}^{2}}{2}\\right ) \\boldsymbol{n} - \\frac{1}{2} \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "a = e1, b = e2, c = -e1, and d = e3\n",
       "A = F(a) = 1/2*(a*a*n+2*a-nbar), etc.\n",
       "Circle through a, b, and c\n",
       "\\begin{equation*} Circle: A\\W B\\W C\\W X = 0 = - x_{3} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n} + x_{3} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{\\bar{n}} + \\left ( \\frac{{\\left ( x_{1} \\right )}^{2}}{2} + \\frac{{\\left ( x_{2} \\right )}^{2}}{2} + \\frac{{\\left ( x_{3} \\right )}^{2}}{2} - \\frac{1}{2}\\right ) \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "Line through a and b\n",
       "\\begin{equation*} Line  : A\\W B\\W n\\W X = 0 = - x_{3} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n} + \\left ( \\frac{x_{1}}{2} + \\frac{x_{2}}{2} - \\frac{1}{2}\\right ) \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} + \\frac{x_{3}}{2} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} - \\frac{x_{3}}{2} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "Sphere through a, b, c, and d\n",
       "\\begin{equation*} Sphere: A\\W B\\W C\\W D\\W X = 0 = \\left ( - \\frac{{\\left ( x_{1} \\right )}^{2}}{2} - \\frac{{\\left ( x_{2} \\right )}^{2}}{2} - \\frac{{\\left ( x_{3} \\right )}^{2}}{2} + \\frac{1}{2}\\right ) \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "Plane through a, b, and d\n",
       "\\begin{equation*} Plane : A\\W B\\W n\\W D\\W X = 0 = \\left ( - \\frac{x_{1}}{2} - \\frac{x_{2}}{2} - \\frac{x_{3}}{2} + \\frac{1}{2}\\right ) \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{n}\\wedge \\boldsymbol{\\bar{n}} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def properties_of_geometric_objects():\n",
       "    Print_Function()\n",
       "    global n, nbar\n",
       "    Fmt(1)\n",
       "    g = '# # # 0 0,'+ \\\n",
       "        '# # # 0 0,'+ \\\n",
       "        '# # # 0 0,'+ \\\n",
       "        '0 0 0 0 2,'+ \\\n",
       "        '0 0 0 2 0'\n",
       "    c3d = Ga('p1 p2 p3 n \\\\bar{n}',g=g)\n",
       "    (p1,p2,p3,n,nbar) = c3d.mv()\n",
       "    print('g_{ij} =',c3d.g)\n",
       "    P1 = F(p1)\n",
       "    P2 = F(p2)\n",
       "    P3 = F(p3)\n",
       "    print('\\\\text{Extracting direction of line from }L = P1\\\\W P2\\\\W n')\n",
       "    L = P1^P2^n\n",
       "    delta = (L|n)|nbar\n",
       "    print('(L|n)|\\\\bar{n} =',delta)\n",
       "    print('\\\\text{Extracting plane of circle from }C = P1\\\\W P2\\\\W P3')\n",
       "    C = P1^P2^P3\n",
       "    delta = ((C^n)|n)|nbar\n",
       "    print('((C^n)|n)|\\\\bar{n}=',delta)\n",
       "    print('(p2-p1)^(p3-p1)=',(p2-p1)^(p3-p1))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccccc}\\left (\\boldsymbol{p}_{1}\\cdot \\boldsymbol{p}_{1}\\right )  & \\left (\\boldsymbol{p}_{1}\\cdot \\boldsymbol{p}_{2}\\right )  & \\left (\\boldsymbol{p}_{1}\\cdot \\boldsymbol{p}_{3}\\right )  & 0 & 0\\\\\\left (\\boldsymbol{p}_{1}\\cdot \\boldsymbol{p}_{2}\\right )  & \\left (\\boldsymbol{p}_{2}\\cdot \\boldsymbol{p}_{2}\\right )  & \\left (\\boldsymbol{p}_{2}\\cdot \\boldsymbol{p}_{3}\\right )  & 0 & 0\\\\\\left (\\boldsymbol{p}_{1}\\cdot \\boldsymbol{p}_{3}\\right )  & \\left (\\boldsymbol{p}_{2}\\cdot \\boldsymbol{p}_{3}\\right )  & \\left (\\boldsymbol{p}_{3}\\cdot \\boldsymbol{p}_{3}\\right )  & 0 & 0\\\\0 & 0 & 0 & 0 & 2\\\\0 & 0 & 0 & 2 & 0\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{Extracting direction of line from }L = P1\\W P2\\W n \\end{equation*}\n",
       "\\begin{equation*} (L\\cdot n)\\cdot \\bar{n} = 2 \\boldsymbol{p}_{1} -2 \\boldsymbol{p}_{2} \\end{equation*}\n",
       "\\begin{equation*} \\text{Extracting plane of circle from }C = P1\\W P2\\W P3 \\end{equation*}\n",
       "\\begin{equation*} ((C\\W n)\\cdot n)\\cdot \\bar{n}= 2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} -2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} + 2 \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{equation*}\n",
       "\\begin{equation*} (p2-p1)\\W (p3-p1)=  \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} - \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} + \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def extracting_vectors_from_conformal_2_blade():\n",
       "    Print_Function()\n",
       "    Fmt(1)\n",
       "    print(r'B = P1\\W P2')\n",
       "    g = '0 -1 #,'+ \\\n",
       "        '-1 0 #,'+ \\\n",
       "        '# # #'\n",
       "    c2b = Ga('P1 P2 a',g=g)\n",
       "    (P1,P2,a) = c2b.mv()\n",
       "    print('g_{ij} =',c2b.g)\n",
       "    B = P1^P2\n",
       "    Bsq = B*B\n",
       "    print('%B^{2} =',Bsq)\n",
       "    ap = a-(a^B)*B\n",
       "    print(\"a' = a-(a^B)*B =\",ap)\n",
       "    Ap = ap+ap*B\n",
       "    Am = ap-ap*B\n",
       "    print(\"A+ = a'+a'*B =\",Ap)\n",
       "    print(\"A- = a'-a'*B =\",Am)\n",
       "    print('%(A+)^{2} =',Ap*Ap)\n",
       "    print('%(A-)^{2} =',Am*Am)\n",
       "    aB = a|B\n",
       "    print('a|B =',aB)\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} B = P1\\W P2 \\end{equation*}\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccc}0 & -1 & \\left (\\boldsymbol{P}_{1}\\cdot \\boldsymbol{a}\\right ) \\\\-1 & 0 & \\left (\\boldsymbol{P}_{2}\\cdot \\boldsymbol{a}\\right ) \\\\\\left (\\boldsymbol{P}_{1}\\cdot \\boldsymbol{a}\\right )  & \\left (\\boldsymbol{P}_{2}\\cdot \\boldsymbol{a}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{a}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} B^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} a' = a-(a\\W B) B = - \\left (\\boldsymbol{P}_{2}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{1} - \\left (\\boldsymbol{P}_{1}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{2} \\end{equation*}\n",
       "\\begin{equation*} A+ = a'+a' B = - 2 \\left (\\boldsymbol{P}_{2}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{1} \\end{equation*}\n",
       "\\begin{equation*} A- = a'-a' B = - 2 \\left (\\boldsymbol{P}_{1}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{2} \\end{equation*}\n",
       "\\begin{equation*} (A+)^{2} =  0 \\end{equation*}\n",
       "\\begin{equation*} (A-)^{2} =  0 \\end{equation*}\n",
       "\\begin{equation*} a\\cdot B = - \\left (\\boldsymbol{P}_{2}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{1} + \\left (\\boldsymbol{P}_{1}\\cdot \\boldsymbol{a}\\right )  \\boldsymbol{P}_{2} \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def reciprocal_frame_test():\n",
       "    Print_Function()\n",
       "    Fmt(1)\n",
       "    g = '1 # #,'+ \\\n",
       "        '# 1 #,'+ \\\n",
       "        '# # 1'\n",
       "    ng3d = Ga('e1 e2 e3',g=g)\n",
       "    (e1,e2,e3) = ng3d.mv()\n",
       "    print('g_{ij} =',ng3d.g)\n",
       "    E = e1^e2^e3\n",
       "    Esq = (E*E).scalar()\n",
       "    print('E =',E)\n",
       "    print('%E^{2} =',Esq)\n",
       "    Esq_inv = 1/Esq\n",
       "    E1 = (e2^e3)*E\n",
       "    E2 = (-1)*(e1^e3)*E\n",
       "    E3 = (e1^e2)*E\n",
       "    print('E1 = (e2^e3)*E =',E1)\n",
       "    print('E2 =-(e1^e3)*E =',E2)\n",
       "    print('E3 = (e1^e2)*E =',E3)\n",
       "    w = (E1|e2)\n",
       "    w = w.expand()\n",
       "    print('E1|e2 =',w)\n",
       "    w = (E1|e3)\n",
       "    w = w.expand()\n",
       "    print('E1|e3 =',w)\n",
       "    w = (E2|e1)\n",
       "    w = w.expand()\n",
       "    print('E2|e1 =',w)\n",
       "    w = (E2|e3)\n",
       "    w = w.expand()\n",
       "    print('E2|e3 =',w)\n",
       "    w = (E3|e1)\n",
       "    w = w.expand()\n",
       "    print('E3|e1 =',w)\n",
       "    w = (E3|e2)\n",
       "    w = w.expand()\n",
       "    print('E3|e2 =',w)\n",
       "    w = (E1|e1)\n",
       "    w = (w.expand()).scalar()\n",
       "    Esq = expand(Esq)\n",
       "    print('%(E1\\\\cdot e1)/E^{2} =',simplify(w/Esq))\n",
       "    w = (E2|e2)\n",
       "    w = (w.expand()).scalar()\n",
       "    print('%(E2\\\\cdot e2)/E^{2} =',simplify(w/Esq))\n",
       "    w = (E3|e3)\n",
       "    w = (w.expand()).scalar()\n",
       "    print('%(E3\\\\cdot e3)/E^{2} =',simplify(w/Esq))\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccc}1 & \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  & \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) \\\\\\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  & 1 & \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\\\\\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  & \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} E =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E^{2} = \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1 \\end{equation*}\n",
       "\\begin{equation*} E1 = (e2\\W e3) E = \\left ( \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{2} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E2 =-(e1\\W e3) E = \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{1} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E3 = (e1\\W e2) E = \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{1} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{2} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E1\\cdot e2 =  0 \\end{equation*}\n",
       "\\begin{equation*} E1\\cdot e3 =  0 \\end{equation*}\n",
       "\\begin{equation*} E2\\cdot e1 =  0 \\end{equation*}\n",
       "\\begin{equation*} E2\\cdot e3 =  0 \\end{equation*}\n",
       "\\begin{equation*} E3\\cdot e1 =  0 \\end{equation*}\n",
       "\\begin{equation*} E3\\cdot e2 =  0 \\end{equation*}\n",
       "\\begin{equation*} (E1\\cdot e1)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} (E2\\cdot e2)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} (E3\\cdot e3)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def signature_test():\n",
       "    Print_Function()\n",
       "    e3d = Ga('e1 e2 e3',g=[1,1,1])\n",
       "    print('g =', e3d.g)\n",
       "    print(r'%Signature = (3,0)\\: I =', e3d.I(), r'\\: I^{2} =', e3d.I()*e3d.I())\n",
       "    e3d = Ga('e1 e2 e3',g=[2,2,2])\n",
       "    print('g =', e3d.g)\n",
       "    print(r'%Signature = (3,0)\\: I =', e3d.I(),'|; I^{2} =', e3d.I()*e3d.I())\n",
       "    sp4d = Ga('e1 e2 e3 e4',g=[1,-1,-1,-1])\n",
       "    print('g =', sp4d.g)\n",
       "    print(r'%Signature = (1,3)\\: I =', sp4d.I(), r'\\: I^{2} =', sp4d.I()*sp4d.I())\n",
       "    sp4d = Ga('e1 e2 e3 e4',g=[2,-2,-2,-2])\n",
       "    print('g =', sp4d.g)\n",
       "    print(r'%Signature = (1,3)\\: I =', sp4d.I(), r'\\: I^{2} =', sp4d.I()*sp4d.I())\n",
       "    e4d = Ga('e1 e2 e3 e4',g=[1,1,1,1])\n",
       "    print('g =', e4d.g)\n",
       "    print(r'%Signature = (4,0)\\: I =', e4d.I(), r'\\: I^{2} =', e4d.I()*e4d.I())\n",
       "    cf3d = Ga('e1 e2 e3 e4 e5',g=[1,1,1,1,-1])\n",
       "    print('g =', cf3d.g)\n",
       "    print(r'%Signature = (4,1)\\: I =', cf3d.I(), r'\\: I^{2} =', cf3d.I()*cf3d.I())\n",
       "    cf3d = Ga('e1 e2 e3 e4 e5',g=[2,2,2,2,-2])\n",
       "    print('g =', cf3d.g)\n",
       "    print(r'%Signature = (4,1)\\: I =', cf3d.I(), r'\\: I^{2} =', cf3d.I()*cf3d.I())\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (3,0)\\: I =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\: I^{2} = -1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}2 & 0 & 0\\\\0 & 2 & 0\\\\0 & 0 & 2\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (3,0)\\: I = \\frac{\\sqrt{2}}{4} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} |; I^{2} = -1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}1 & 0 & 0 & 0\\\\0 & -1 & 0 & 0\\\\0 & 0 & -1 & 0\\\\0 & 0 & 0 & -1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (1,3)\\: I =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4} \\: I^{2} = -1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}2 & 0 & 0 & 0\\\\0 & -2 & 0 & 0\\\\0 & 0 & -2 & 0\\\\0 & 0 & 0 & -2\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (1,3)\\: I = \\frac{1}{4} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4} \\: I^{2} = -1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}1 & 0 & 0 & 0\\\\0 & 1 & 0 & 0\\\\0 & 0 & 1 & 0\\\\0 & 0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (4,0)\\: I =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4} \\: I^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccccc}1 & 0 & 0 & 0 & 0\\\\0 & 1 & 0 & 0 & 0\\\\0 & 0 & 1 & 0 & 0\\\\0 & 0 & 0 & 1 & 0\\\\0 & 0 & 0 & 0 & -1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (4,1)\\: I =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4}\\wedge \\boldsymbol{e}_{5} \\: I^{2} = -1 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccccc}2 & 0 & 0 & 0 & 0\\\\0 & 2 & 0 & 0 & 0\\\\0 & 0 & 2 & 0 & 0\\\\0 & 0 & 0 & 2 & 0\\\\0 & 0 & 0 & 0 & -2\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} Signature = (4,1)\\: I = \\frac{\\sqrt{2}}{8} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}\\wedge \\boldsymbol{e}_{4}\\wedge \\boldsymbol{e}_{5} \\: I^{2} = -1 \\end{equation*}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def Fmt_test():\n",
       "    Print_Function()\n",
       "    e3d = Ga('e1 e2 e3',g=[1,1,1])\n",
       "    v = e3d.mv('v','vector')\n",
       "    B = e3d.mv('B','bivector')\n",
       "    M = e3d.mv('M','mv')\n",
       "    Fmt(2)\n",
       "    print('#Global $Fmt = 2$')\n",
       "    print('v =',v)\n",
       "    print('B =',B)\n",
       "    print('M =',M)\n",
       "    print('#Using $.Fmt()$ Function')\n",
       "    print('v.Fmt(3) =',v.Fmt(3))\n",
       "    print('B.Fmt(3) =',B.Fmt(3))\n",
       "    print('M.Fmt(2) =',M.Fmt(2))\n",
       "    print('M.Fmt(1) =',M.Fmt(1))\n",
       "    print('#Global $Fmt = 1$')\n",
       "    Fmt(1)\n",
       "    print('v =',v)\n",
       "    print('B =',B)\n",
       "    print('M =',M)\n",
       "    return\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "Global $Fmt = 2$\n",
       "\\begin{equation*} v = v^{1} \\boldsymbol{e}_{1} + v^{2} \\boldsymbol{e}_{2} + v^{3} \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} B = B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} M =  \\begin{aligned}[t]  & M  \\\\  &  + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\  &  + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\  &  + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}  \\end{aligned} \\end{equation*}\n",
       "Using $.Fmt()$ Function\n",
       "\\begin{equation*} v.Fmt(3) =  \\begin{aligned}[t]  & v^{1} \\boldsymbol{e}_{1} \\\\  &  + v^{2} \\boldsymbol{e}_{2} \\\\  &  + v^{3} \\boldsymbol{e}_{3}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} B.Fmt(3) =  \\begin{aligned}[t]  & B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} \\\\  &  + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} \\\\  &  + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} M.Fmt(2) =  \\begin{aligned}[t]  & M  \\\\  &  + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\  &  + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\  &  + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} M.Fmt(1) = M  + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "Global $Fmt = 1$\n",
       "\\begin{equation*} v = v^{1} \\boldsymbol{e}_{1} + v^{2} \\boldsymbol{e}_{2} + v^{3} \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} B = B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} M = M  + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('latex_check')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "3d orthogonal ($A$ is vector function)\n",
       "\\begin{equation*} A = A^{x}  \\boldsymbol{e}_{x} + A^{y}  \\boldsymbol{e}_{y} + A^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} A^{2} = {A^{x} }^{2} + {A^{y} }^{2} + {A^{z} }^{2} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  A = \\left ( \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\right )  + \\left ( - \\partial_{y} A^{x}  + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x}  + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y}  + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v\\cdot (\\boldsymbol{\\nabla}  A) = \\left ( v^{y} \\partial_{y} A^{x}  - v^{y} \\partial_{x} A^{y}  + v^{z} \\partial_{z} A^{x}  - v^{z} \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( - v^{x} \\partial_{y} A^{x}  + v^{x} \\partial_{x} A^{y}  + v^{z} \\partial_{z} A^{y}  - v^{z} \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - v^{x} \\partial_{z} A^{x}  + v^{x} \\partial_{x} A^{z}  - v^{y} \\partial_{z} A^{y}  + v^{y} \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "2d general ($A$ is vector function)\n",
       "\\begin{equation*} A = A^{u}  \\boldsymbol{e}_{u} + A^{v}  \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} A^{2} = \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  {A^{u} }^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A^{u}  A^{v}  + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  {A^{v} }^{2} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\partial_{u} A^{u}  + \\partial_{v} A^{v} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  A = \\left ( \\partial_{u} A^{u}  + \\partial_{v} A^{v} \\right )  + \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\partial_{v} A^{u}  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\partial_{u} A^{u}  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\partial_{v} A^{v}  + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  \\partial_{u} A^{v} }{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} \\end{equation*}\n",
       "3d orthogonal ($A,\\;B$ are linear transformations)\n",
       "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& A_{xx} \\boldsymbol{e}_{x} + A_{yx} \\boldsymbol{e}_{y} + A_{zx} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& A_{xy} \\boldsymbol{e}_{x} + A_{yy} \\boldsymbol{e}_{y} + A_{zy} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& A_{xz} \\boldsymbol{e}_{x} + A_{yz} \\boldsymbol{e}_{y} + A_{zz} \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\f{mat}{A} = \\left[\\begin{array}{ccc}A_{xx} & A_{xy} & A_{xz}\\\\A_{yx} & A_{yy} & A_{yz}\\\\A_{zx} & A_{zy} & A_{zz}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\f{\\det}{A} = A_{xz} \\left(A_{yx} A_{zy} - A_{yy} A_{zx}\\right) - A_{yz} \\left(A_{xx} A_{zy} - A_{xy} A_{zx}\\right) + A_{zz} \\left(A_{xx} A_{yy} - A_{xy} A_{yx}\\right) \\end{equation*}\n",
       "\\begin{equation*} \\overline{A} = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& A_{xx} \\boldsymbol{e}_{x} + A_{xy} \\boldsymbol{e}_{y} + A_{xz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& A_{yx} \\boldsymbol{e}_{x} + A_{yy} \\boldsymbol{e}_{y} + A_{yz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& A_{zx} \\boldsymbol{e}_{x} + A_{zy} \\boldsymbol{e}_{y} + A_{zz} \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\f{\\Tr}{A} = A_{xx} + A_{yy} + A_{zz} \\end{equation*}\n",
       "\\begin{equation*} \\f{A}{e_x\\W e_y} = \\left ( A_{xx} A_{yy} - A_{xy} A_{yx}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( A_{xx} A_{zy} - A_{xy} A_{zx}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( A_{yx} A_{zy} - A_{yy} A_{zx}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\f{A}{e_x}\\W \\f{A}{e_y} = \\left ( A_{xx} A_{yy} - A_{xy} A_{yx}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( A_{xx} A_{zy} - A_{xy} A_{zx}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( A_{yx} A_{zy} - A_{yy} A_{zx}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} g^{-1} = \\left[\\begin{array}{ccc}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} A + B = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& \\left ( A_{xx} + B_{xx}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yx} + B_{yx}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zx} + B_{zx}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& \\left ( A_{xy} + B_{xy}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yy} + B_{yy}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zy} + B_{zy}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& \\left ( A_{xz} + B_{xz}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yz} + B_{yz}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zz} + B_{zz}\\right ) \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} AB = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& \\left ( A_{xx} B_{xx} + A_{xy} B_{yx} + A_{xz} B_{zx}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yx} B_{xx} + A_{yy} B_{yx} + A_{yz} B_{zx}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zx} B_{xx} + A_{zy} B_{yx} + A_{zz} B_{zx}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& \\left ( A_{xx} B_{xy} + A_{xy} B_{yy} + A_{xz} B_{zy}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yx} B_{xy} + A_{yy} B_{yy} + A_{yz} B_{zy}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zx} B_{xy} + A_{zy} B_{yy} + A_{zz} B_{zy}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& \\left ( A_{xx} B_{xz} + A_{xy} B_{yz} + A_{xz} B_{zz}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yx} B_{xz} + A_{yy} B_{yz} + A_{yz} B_{zz}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zx} B_{xz} + A_{zy} B_{yz} + A_{zz} B_{zz}\\right ) \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} A - B = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& \\left ( A_{xx} - B_{xx}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yx} - B_{yx}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zx} - B_{zx}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& \\left ( A_{xy} - B_{xy}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yy} - B_{yy}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zy} - B_{zy}\\right ) \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& \\left ( A_{xz} - B_{xz}\\right ) \\boldsymbol{e}_{x} + \\left ( A_{yz} - B_{yz}\\right ) \\boldsymbol{e}_{y} + \\left ( A_{zz} - B_{zz}\\right ) \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} General Symmetric Linear Transformation \\end{equation*}\n",
       "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& A_{xx} \\boldsymbol{e}_{x} + A_{xy} \\boldsymbol{e}_{y} + A_{xz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& A_{xy} \\boldsymbol{e}_{x} + A_{yy} \\boldsymbol{e}_{y} + A_{yz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& A_{xz} \\boldsymbol{e}_{x} + A_{yz} \\boldsymbol{e}_{y} + A_{zz} \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} General Antisymmetric Linear Transformation \\end{equation*}\n",
       "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{x}\\right ) =& - A_{xy} \\boldsymbol{e}_{y} - A_{xz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& A_{xy} \\boldsymbol{e}_{x} - A_{yz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& A_{xz} \\boldsymbol{e}_{x} + A_{yz} \\boldsymbol{e}_{y}  \\end{array} \\right \\} \\end{equation*}\n",
       "2d general ($A,\\;B$ are linear transformations)\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cc}\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  & \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) \\\\\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  & \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} g^{-1} = \\left[\\begin{array}{cc}\\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) }{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} & - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) }{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\\\- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) }{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} & \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) }{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} gg^{-1} = \\left[\\begin{array}{cc}1 & 0\\\\0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{u}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v} \\\\ L \\left ( \\boldsymbol{e}_{v}\\right ) =& \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\f{mat}{A} = \\left[\\begin{array}{cc}A_{uu} & A_{uv}\\\\A_{vu} & A_{vv}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\f{\\det}{A} = \\frac{- \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} + \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v}}{\\sqrt{\\left (\\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\cdot \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\right )  \\left (\\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\cdot \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\right )  - \\left (\\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} + \\frac{\\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\cdot \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{u} + \\left(\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}}\\right) \\boldsymbol{e}_{v}\\right ) ^{2}}} \\end{equation*}\n",
       "\\begin{equation*} \\overline{A} = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{u}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{3} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} \\boldsymbol{e}_{v} \\\\ L \\left ( \\boldsymbol{e}_{v}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} \\boldsymbol{e}_{v}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\f{mat}{\\overline{A}} = \\left[\\begin{array}{cc}- \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left(\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu}\\right) + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left(\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv} - \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vu}\\right)}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} & \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vv} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4} A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}}\\\\\\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{4} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{3} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{3} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vv} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} & \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left(\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{3} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}\\right) + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  \\left(\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vu}\\right)}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\f{\\Tr}{A} = - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{vv}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} A_{uu}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{uv}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} - \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{3} A_{vu}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu}}{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2} \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{4}} \\end{equation*}\n",
       "\\begin{equation*} \\f{A}{e_u\\W e_v} = \\frac{A_{uu} A_{vv} - A_{uv} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\f{A}{e_u}\\W \\f{A}{e_v} = \\frac{A_{uu} A_{vv} - A_{uv} A_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} B = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{u}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v} \\\\ L \\left ( \\boldsymbol{e}_{v}\\right ) =& \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} A + B = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{u}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v} \\\\ L \\left ( \\boldsymbol{e}_{v}\\right ) =& \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} A - B = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{u}\\right ) =& \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} - \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{- \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vv} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vv} + \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} - \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v} \\\\ L \\left ( \\boldsymbol{e}_{v}\\right ) =& \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{uv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{uu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{uu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{u} + \\frac{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  A_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  B_{vv} - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  A_{vu} + \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right )  B_{vu}}{\\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{u}\\right )  \\left (\\boldsymbol{e}_{v}\\cdot \\boldsymbol{e}_{v}\\right )  - \\left (\\boldsymbol{e}_{u}\\cdot \\boldsymbol{e}_{v}\\right ) ^{2}} \\boldsymbol{e}_{v}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} a\\cdot \\f{\\overline{A}}{b}-b\\cdot \\f{\\underline{A}}{a} =  0 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}1 & 0 & 0 & 0\\\\0 & -1 & 0 & 0\\\\0 & 0 & -1 & 0\\\\0 & 0 & 0 & -1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\underline{T} = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{t}\\right ) =& T_{tt} \\boldsymbol{e}_{t} + T_{xt} \\boldsymbol{e}_{x} + T_{yt} \\boldsymbol{e}_{y} + T_{zt} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{x}\\right ) =& - T_{tx} \\boldsymbol{e}_{t} - T_{xx} \\boldsymbol{e}_{x} - T_{yx} \\boldsymbol{e}_{y} - T_{zx} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& - T_{ty} \\boldsymbol{e}_{t} - T_{xy} \\boldsymbol{e}_{x} - T_{yy} \\boldsymbol{e}_{y} - T_{zy} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& - T_{tz} \\boldsymbol{e}_{t} - T_{xz} \\boldsymbol{e}_{x} - T_{yz} \\boldsymbol{e}_{y} - T_{zz} \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\overline{T} = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{t}\\right ) =& T_{tt} \\boldsymbol{e}_{t} + T_{tx} \\boldsymbol{e}_{x} + T_{ty} \\boldsymbol{e}_{y} + T_{tz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{x}\\right ) =& - T_{xt} \\boldsymbol{e}_{t} - T_{xx} \\boldsymbol{e}_{x} - T_{xy} \\boldsymbol{e}_{y} - T_{xz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{y}\\right ) =& - T_{yt} \\boldsymbol{e}_{t} - T_{yx} \\boldsymbol{e}_{x} - T_{yy} \\boldsymbol{e}_{y} - T_{yz} \\boldsymbol{e}_{z} \\\\ L \\left ( \\boldsymbol{e}_{z}\\right ) =& - T_{zt} \\boldsymbol{e}_{t} - T_{zx} \\boldsymbol{e}_{x} - T_{zy} \\boldsymbol{e}_{y} - T_{zz} \\boldsymbol{e}_{z}  \\end{array} \\right \\} \\end{equation*}\n",
       "\\begin{equation*} \\f{\\det}{\\underline{T}} = T_{tz} \\left(T_{xt} T_{yx} T_{zy} - T_{xt} T_{yy} T_{zx} - T_{xx} T_{yt} T_{zy} + T_{xx} T_{yy} T_{zt} + T_{xy} T_{yt} T_{zx} - T_{xy} T_{yx} T_{zt}\\right) - T_{xz} \\left(T_{tt} T_{yx} T_{zy} - T_{tt} T_{yy} T_{zx} - T_{tx} T_{yt} T_{zy} + T_{tx} T_{yy} T_{zt} + T_{ty} T_{yt} T_{zx} - T_{ty} T_{yx} T_{zt}\\right) + T_{yz} \\left(T_{tt} T_{xx} T_{zy} - T_{tt} T_{xy} T_{zx} - T_{tx} T_{xt} T_{zy} + T_{tx} T_{xy} T_{zt} + T_{ty} T_{xt} T_{zx} - T_{ty} T_{xx} T_{zt}\\right) - T_{zz} \\left(T_{tt} T_{xx} T_{yy} - T_{tt} T_{xy} T_{yx} - T_{tx} T_{xt} T_{yy} + T_{tx} T_{xy} T_{yt} + T_{ty} T_{xt} T_{yx} - T_{ty} T_{xx} T_{yt}\\right) \\end{equation*}\n",
       "\\begin{equation*} \\f{\\mbox{tr}}{\\underline{T}} = T_{tt} - T_{xx} - T_{yy} - T_{zz} \\end{equation*}\n",
       "\\begin{equation*} a\\cdot \\f{\\overline{T}}{b}-b\\cdot \\f{\\underline{T}}{a} =  0 \\end{equation*}\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{u} f  \\boldsymbol{e}_{u} + \\frac{\\partial_{v} f }{\\sin{\\left (u \\right )}} \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} F = F^{u}  \\boldsymbol{e}_{u} + F^{v}  \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F = \\left ( \\frac{F^{u} }{\\tan{\\left (u \\right )}} + \\partial_{u} F^{u}  + \\frac{\\partial_{v} F^{v} }{\\sin{\\left (u \\right )}}\\right )  + \\left ( \\frac{F^{v} }{\\tan{\\left (u \\right )}} + \\partial_{u} F^{v}  - \\frac{\\partial_{v} F^{u} }{\\sin{\\left (u \\right )}}\\right ) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} f = f \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{\\theta } f  \\boldsymbol{e}_{\\theta } + \\frac{\\partial_{\\phi } f }{\\sin{\\left (\\theta  \\right )}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} F = F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F = \\left ( \\frac{F^{\\theta } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } F^{\\theta }  + \\frac{\\partial_{\\phi } F^{\\phi } }{\\sin{\\left (\\theta  \\right )}}\\right )  + \\left ( \\frac{F^{\\phi } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } F^{\\phi }  - \\frac{\\partial_{\\phi } F^{\\theta } }{\\sin{\\left (\\theta  \\right )}}\\right ) \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('lin_tran_check')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}1 & \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  & 0\\\\\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & 1 & \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  & 0\\\\\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  & \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  & 1 & 0\\\\0 & 0 & 0 & -1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = x_{E} \\boldsymbol{e}_{E} + x_{B} \\boldsymbol{e}_{B} + x_{k} \\boldsymbol{e}_{k} + t \\boldsymbol{e}_{t} \\end{equation*}\n",
       "\\begin{equation*} K = k \\boldsymbol{e}_{k} + \\omega  \\boldsymbol{e}_{t} \\end{equation*}\n",
       "\\begin{equation*} K\\cdot X = \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t \\end{equation*}\n",
       "\\begin{equation*} F = \\frac{\\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  B e^{i \\left(\\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t\\right)}}{\\sqrt{- \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2} - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{B} - \\frac{B e^{i \\left(\\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t\\right)}}{\\sqrt{- \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2} - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k} + E e^{i \\left(\\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t\\right)} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{t} + \\frac{\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  B e^{i \\left(\\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t\\right)}}{\\sqrt{- \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 2 \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right ) ^{2} - \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Substituting }e_{E}\\cdot e_{B} = e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0 \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cccc}1 & \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  & 0\\\\\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{B}\\right )  & 1 & \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  & 0\\\\\\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  & \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  & 1 & 0\\\\0 & 0 & 0 & -1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = x_{E} \\boldsymbol{e}_{E} + x_{B} \\boldsymbol{e}_{B} + x_{k} \\boldsymbol{e}_{k} + t \\boldsymbol{e}_{t} \\end{equation*}\n",
       "\\begin{equation*} K = k \\boldsymbol{e}_{k} + \\omega  \\boldsymbol{e}_{t} \\end{equation*}\n",
       "\\begin{equation*} K\\cdot X = \\left (\\boldsymbol{e}_{B}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{B} + \\left (\\boldsymbol{e}_{E}\\cdot \\boldsymbol{e}_{k}\\right )  k x_{E} + k x_{k} - \\omega  t \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Substituting }e_{E}\\cdot e_{B} = e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0 \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('linear_EM_waves')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} (u,v)\\rightarrow (r,\\theta,\\phi) =  [1, u, v] \\end{equation*}\n",
       "Unit Sphere Manifold:\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cc}1 & 0\\\\0 & {\\sin{\\left (u \\right )}}^{2}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} a = a^{u} \\boldsymbol{e}_{u} + a^{v} \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} f = f^{u}  \\boldsymbol{e}_{u} + f^{v}  \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\nabla = \\boldsymbol{e}_{u} \\frac{\\partial}{\\partial u} + \\boldsymbol{e}_{v} \\frac{1}{{\\sin{\\left (u \\right )}}^{2}} \\frac{\\partial}{\\partial v} \\end{equation*}\n",
       "\\begin{equation*} a\\cdot\\nabla = a^{u} \\frac{\\partial}{\\partial u} + a^{v} \\frac{\\partial}{\\partial v} \\end{equation*}\n",
       "\\begin{equation*} \\paren{a\\cdot\\nabla}\\bm{e}_u = \\frac{a^{v}}{\\tan{\\left (u \\right )}} \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\paren{a\\cdot\\nabla}\\bm{e}_v = - \\frac{a^{v} \\sin{\\left (2 u \\right )}}{2} \\boldsymbol{e}_{u} + \\frac{a^{u}}{\\tan{\\left (u \\right )}} \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\paren{a\\cdot\\nabla}f = \\left ( a^{u} \\partial_{u} f^{u}  - \\frac{a^{v} f^{v}  \\sin{\\left (2 u \\right )}}{2} + a^{v} \\partial_{v} f^{u} \\right ) \\boldsymbol{e}_{u} + \\left ( \\frac{a^{u} f^{v} }{\\tan{\\left (u \\right )}} + a^{u} \\partial_{u} f^{v}  + \\frac{a^{v} f^{u} }{\\tan{\\left (u \\right )}} + a^{v} \\partial_{v} f^{v} \\right ) \\boldsymbol{e}_{v} \\end{equation*}\n",
       "\\begin{equation*} \\nabla f = \\left ( \\frac{f^{u} }{\\tan{\\left (u \\right )}} + \\partial_{u} f^{u}  + \\partial_{v} f^{v} \\right )  + \\left ( \\frac{2 f^{v} }{\\tan{\\left (u \\right )}} + \\partial_{u} f^{v}  - \\frac{\\partial_{v} f^{u} }{{\\sin{\\left (u \\right )}}^{2}}\\right ) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v} \\end{equation*}\n",
       "1-D Manifold On Unit Sphere:\n",
       "\\begin{equation*} \\nabla = \\boldsymbol{e}_{s} \\frac{1}{{\\sin{\\left (u^{s}  \\right )}}^{2} \\left(\\partial_{s} v^{s} \\right)^{2} + \\left(\\partial_{s} u^{s} \\right)^{2}} \\frac{\\partial}{\\partial s} \\end{equation*}\n",
       "\\begin{equation*} \\nabla g = \\frac{\\partial_{s} g }{{\\sin{\\left (u^{s}  \\right )}}^{2} \\left(\\partial_{s} v^{s} \\right)^{2} + \\left(\\partial_{s} u^{s} \\right)^{2}} \\boldsymbol{e}_{s} \\end{equation*}\n",
       "\\begin{equation*} \\nabla \\cdot \\bm{h} = \\frac{\\left({\\sin{\\left (u^{s}  \\right )}}^{2} \\left(\\partial_{s} v^{s} \\right)^{2} + \\left(\\partial_{s} u^{s} \\right)^{2}\\right) \\partial_{s} h^{s}  + \\left({\\sin{\\left (u^{s}  \\right )}}^{2} \\partial_{s} v^{s}  \\partial^{2}_{s} v^{s}  + \\partial_{s} u^{s}  \\partial^{2}_{s} u^{s} \\right) h^{s}  + \\frac{h^{s}  \\sin{\\left (2 u^{s}  \\right )} \\partial_{s} u^{s}  \\left(\\partial_{s} v^{s} \\right)^{2}}{2}}{{\\sin{\\left (u^{s}  \\right )}}^{2} \\left(\\partial_{s} v^{s} \\right)^{2} + \\left(\\partial_{s} u^{s} \\right)^{2}} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('manifold')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\left[\\begin{array}{cc}1 & 2\\\\3 & 4\\end{array}\\right] \\left[\\begin{array}{c}5\\\\6\\end{array}\\right] = \\left[\\begin{array}{c}17\\\\39\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\left[\\begin{array}{cc}x^{3} & y^{3}\\end{array}\\right] \\left[\\begin{array}{cc}x^{2} & 2 x y\\\\2 x y & y^{2}\\end{array}\\right] = \\left[\\begin{array}{cc}x^{5} + 2 x y^{4} & 2 x^{4} y + y^{5}\\end{array}\\right] \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('matrix_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "Results with all scalar variables declared as real\n",
       "\\begin{equation*} X = t \\boldsymbol{\\gamma }_{t} + x \\boldsymbol{\\gamma }_{x} + y \\boldsymbol{\\gamma }_{y} + z \\boldsymbol{\\gamma }_{z} + w \\boldsymbol{\\gamma }_{w} \\end{equation*}\n",
       "\\begin{equation*} K = k^{t} \\boldsymbol{\\gamma }_{t} + k^{x} \\boldsymbol{\\gamma }_{x} + k^{y} \\boldsymbol{\\gamma }_{y} + k^{z} \\boldsymbol{\\gamma }_{z} + k^{w} \\boldsymbol{\\gamma }_{w} \\end{equation*}\n",
       "\\begin{equation*} K\\cdot X = k^{t} t - k^{w} w - k^{x} x - k^{y} y - k^{z} z \\end{equation*}\n",
       "\\begin{equation*} I^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} I_{xyzw} = I\\gamma_{x}\\gamma_{y}\\gamma_{z}\\gamma_{w} =  \\boldsymbol{\\gamma }_{t} \\end{equation*}\n",
       "\\begin{equation*} \\lp I\\gamma_{x}\\gamma_{y}\\gamma_{z}\\gamma_{w}\\rp^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} e^{I_{xyzw}K\\cdot X} = \\cosh{\\left (- k^{t} t + k^{w} w + k^{x} x + k^{y} y + k^{z} z \\right )}  - \\sinh{\\left (- k^{t} t + k^{w} w + k^{x} x + k^{y} y + k^{z} z \\right )} \\boldsymbol{\\gamma }_{t} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('new_bug_grad_exp')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\n",
       "def General_Lorentz_Tranformation():\n",
       "    Print_Function()\n",
       "    (alpha,beta,gamma) = symbols('alpha beta gamma')\n",
       "    (x,y,z,t) = symbols(\"x y z t\",real=True)\n",
       "    (st4d,g0,g1,g2,g3) = Ga.build('gamma*t|x|y|z',g=[1,-1,-1,-1])\n",
       "    B = (x*g1+y*g2+z*g3)^(t*g0)\n",
       "    print(B)\n",
       "    print(B.exp(hint='+'))\n",
       "    print(B.exp(hint='-'))\n",
       "\\end{lstlisting}\n",
       "Code Output:\n",
       "\\begin{equation*} - t x \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - t y \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - t z \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} \\cosh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}  - \\frac{t x \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - \\frac{t y \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - \\frac{t z \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} \\cosh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}  - \\frac{t x \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - \\frac{t y \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - \\frac{t z \\sinh{\\left (\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right| \\right )}}{\\sqrt{x^{2} + y^{2} + z^{2}} \\left|{t}\\right|} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('physics_check_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\bm{A} = A  + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\bm{A} = A^{x}  \\boldsymbol{e}_{x} + A^{y}  \\boldsymbol{e}_{y} + A^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\bm{B} = B^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{x} f  \\boldsymbol{e}_{x} + \\partial_{y} f  \\boldsymbol{e}_{y} + \\partial_{z} f  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot \\bm{A} = \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\bm{A} = \\left ( \\partial_{x} A^{x}  + \\partial_{y} A^{y}  + \\partial_{z} A^{z} \\right )  + \\left ( - \\partial_{y} A^{x}  + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x}  + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y}  + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W \\bm{A}) = \\left ( - \\partial_{z} A^{y}  + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{z} A^{x}  - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - \\partial_{y} A^{x}  + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\bm{B} = \\left ( - \\partial_{y} B^{xy}  - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy}  - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz}  + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} + \\left ( \\partial_{z} B^{xy}  - \\partial_{y} B^{xz}  + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W \\bm{B} = \\left ( \\partial_{z} B^{xy}  - \\partial_{y} B^{xz}  + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot \\bm{B} = \\left ( - \\partial_{y} B^{xy}  - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy}  - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz}  + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{cccc}\\left (\\boldsymbol{a}\\cdot \\boldsymbol{a}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{b}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{c}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right ) \\\\\\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{c}\\cdot \\boldsymbol{d}\\right )  & \\left (\\boldsymbol{d}\\cdot \\boldsymbol{d}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b c)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c\\W d)} = \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c} - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{b}\\right )  \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a\\cdot (b\\W c)+c\\cdot (a\\W b)+b\\cdot (c\\W a)} =  0 \\end{equation*}\n",
       "\\begin{equation*} \\bm{a (b\\W c)-b (a\\W c)+c (a\\W b)} = 3 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c} \\end{equation*}\n",
       "\\begin{equation*} \\bm{a (b\\W c\\W d)-b (a\\W c\\W d)+c (a\\W b\\W d)-d (a\\W b\\W c)} = 4 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} \\bm{(a\\W b)\\cdot (c\\W d)} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\bm{((a\\W b)\\cdot c)\\cdot d} = - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right ) \\end{equation*}\n",
       "\\begin{equation*} \\bm{(a\\W b)\\times (c\\W d)} = - \\left (\\boldsymbol{b}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{c} + \\left (\\boldsymbol{b}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{a}\\wedge \\boldsymbol{d} + \\left (\\boldsymbol{a}\\cdot \\boldsymbol{d}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{c} - \\left (\\boldsymbol{a}\\cdot \\boldsymbol{c}\\right )  \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{equation*}\n",
       "\\begin{equation*} E =  \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E^{2} = \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right ) ^{2} - 2 \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1 \\end{equation*}\n",
       "\\begin{equation*} E1 = (e2\\W e3) E = \\left ( \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{2} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E2 =-(e1\\W e3) E = \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{1} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E3 = (e1\\W e2) E = \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{1} + \\left ( - \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right )  \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{3}\\right )  + \\left (\\boldsymbol{e}_{2}\\cdot \\boldsymbol{e}_{3}\\right ) \\right ) \\boldsymbol{e}_{2} + \\left ( \\left (\\boldsymbol{e}_{1}\\cdot \\boldsymbol{e}_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{equation*}\n",
       "\\begin{equation*} E1\\cdot e2 =  0 \\end{equation*}\n",
       "\\begin{equation*} E1\\cdot e3 =  0 \\end{equation*}\n",
       "\\begin{equation*} E2\\cdot e1 =  0 \\end{equation*}\n",
       "\\begin{equation*} E2\\cdot e3 =  0 \\end{equation*}\n",
       "\\begin{equation*} E3\\cdot e1 =  0 \\end{equation*}\n",
       "\\begin{equation*} E3\\cdot e2 =  0 \\end{equation*}\n",
       "\\begin{equation*} (E1\\cdot e1)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} (E2\\cdot e2)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} (E3\\cdot e3)/E^{2} = 1 \\end{equation*}\n",
       "\\begin{equation*} A = A^{r}  \\boldsymbol{e}_{r} + A^{\\theta }  \\boldsymbol{e}_{\\theta } + A^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = B^{r\\theta }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + B^{r\\phi }  \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + B^{\\theta \\phi }  \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{r} f  \\boldsymbol{e}_{r} + \\frac{\\partial_{\\theta } f }{r} \\boldsymbol{e}_{\\theta } + \\frac{\\partial_{\\phi } f }{r \\sin{\\left (\\theta  \\right )}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{r \\partial_{r} A^{r}  + 2 A^{r}  + \\frac{A^{\\theta } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } A^{\\theta }  + \\frac{\\partial_{\\phi } A^{\\phi } }{\\sin{\\left (\\theta  \\right )}}}{r} \\end{equation*}\n",
       "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W A) = \\frac{\\frac{A^{\\phi } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } A^{\\phi }  - \\frac{\\partial_{\\phi } A^{\\theta } }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{- r \\partial_{r} A^{\\phi }  - A^{\\phi }  + \\frac{\\partial_{\\phi } A^{r} }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} A^{\\theta }  + A^{\\theta }  - \\partial_{\\theta } A^{r} }{r} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\frac{r \\partial_{r} B^{\\theta \\phi }  - \\frac{B^{r\\phi } }{\\tan{\\left (\\theta  \\right )}} + 2 B^{\\theta \\phi }  - \\partial_{\\theta } B^{r\\phi }  + \\frac{\\partial_{\\phi } B^{r\\theta } }{\\sin{\\left (\\theta  \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} B = \\bm{B\\gamma_{t}} = - B^{x}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - B^{y}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - B^{z}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} E = \\bm{E\\gamma_{t}} = - E^{x}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - E^{y}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - E^{z}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} F = E+IB = - E^{x}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} - E^{y}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} - E^{z}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} - B^{z}  \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} + B^{y}  \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} - B^{x}  \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} J = J^{t}  \\boldsymbol{\\gamma }_{t} + J^{x}  \\boldsymbol{\\gamma }_{x} + J^{y}  \\boldsymbol{\\gamma }_{y} + J^{z}  \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F = J \\end{equation*}\n",
       "\\begin{equation*} R = \\cosh{\\left (\\frac{\\alpha }{2} \\right )}  + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{equation*}\n",
       "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = t'\\bm{\\gamma'_{t}}+x'\\bm{\\gamma'_{x}} = R\\lp t'\\bm{\\gamma_{t}}+x'\\bm{\\gamma_{x}}\\rp R^{\\dagger} \\end{equation*}\n",
       "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = \\left ( t' \\cosh{\\left (\\alpha  \\right )} - x' \\sinh{\\left (\\alpha  \\right )}\\right ) \\boldsymbol{\\gamma }_{t} + \\left ( - t' \\sinh{\\left (\\alpha  \\right )} + x' \\cosh{\\left (\\alpha  \\right )}\\right ) \\boldsymbol{\\gamma }_{x} \\end{equation*}\n",
       "\\begin{equation*} \\f{\\sinh}{\\alpha} = \\gamma\\beta \\end{equation*}\n",
       "\\begin{equation*} \\f{\\cosh}{\\alpha} = \\gamma \\end{equation*}\n",
       "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = \\gamma  \\left(- \\beta  x' + t'\\right) \\boldsymbol{\\gamma }_{t} + \\gamma  \\left(- \\beta  t' + x'\\right) \\boldsymbol{\\gamma }_{x} \\end{equation*}\n",
       "\\begin{equation*} \\bm{A} = A^{t}  \\boldsymbol{\\gamma }_{t} + A^{x}  \\boldsymbol{\\gamma }_{x} + A^{y}  \\boldsymbol{\\gamma }_{y} + A^{z}  \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} \\bm{\\psi} = \\psi    + \\psi ^{tx}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} + \\psi ^{ty}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} + \\psi ^{tz}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} + \\psi ^{xy}  \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} + \\psi ^{xz}  \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} + \\psi ^{yz}  \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} + \\psi ^{txyz}  \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\n",
       "\\begin{equation*} value = 1 \\end{equation*}\n",
       "\\begin{align*} \\text{untouched} \\end{align*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('print_check_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "3D Orthogonal Metric\\newline\n",
       "Multvectors:\n",
       "\\begin{equation*} s = s \\end{equation*}\n",
       "\\begin{equation*} v = v^{x} \\boldsymbol{e}_{x} + v^{y} \\boldsymbol{e}_{y} + v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b = b^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "Products:\n",
       "\\begin{equation*} s   s = s^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\W  s = s^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  s = s^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  s = s^{2} \\end{equation*}\n",
       "\\begin{equation*} s   v = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\W  v = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  v = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  v =  0 \\end{equation*}\n",
       "\\begin{equation*} s   b = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\W  b = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  b = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  b =  0 \\end{equation*}\n",
       "\\begin{equation*} v   s = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\W  s = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  s = s v^{x} \\boldsymbol{e}_{x} + s v^{y} \\boldsymbol{e}_{y} + s v^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v   v = {\\left ( v^{x} \\right )}^{2} + {\\left ( v^{y} \\right )}^{2} + {\\left ( v^{z} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\W  v =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  v = {\\left ( v^{x} \\right )}^{2} + {\\left ( v^{y} \\right )}^{2} + {\\left ( v^{z} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  v = {\\left ( v^{x} \\right )}^{2} + {\\left ( v^{y} \\right )}^{2} + {\\left ( v^{z} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  v = {\\left ( v^{x} \\right )}^{2} + {\\left ( v^{y} \\right )}^{2} + {\\left ( v^{z} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} v   b = \\left ( - b^{xy} v^{y} - b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy} v^{x} - b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz} v^{x} + b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} + \\left ( b^{xy} v^{z} - b^{xz} v^{y} + b^{yz} v^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\W  b = \\left ( b^{xy} v^{z} - b^{xz} v^{y} + b^{yz} v^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  b = \\left ( - b^{xy} v^{y} - b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy} v^{x} - b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz} v^{x} + b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  b = \\left ( - b^{xy} v^{y} - b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy} v^{x} - b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz} v^{x} + b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  b =  0 \\end{equation*}\n",
       "\\begin{equation*} b   s = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\W  s = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  s = b^{xy} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz} s \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz} s \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b   v = \\left ( b^{xy} v^{y} + b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy} v^{x} + b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz} v^{x} - b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} + \\left ( b^{xy} v^{z} - b^{xz} v^{y} + b^{yz} v^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\W  v = \\left ( b^{xy} v^{z} - b^{xz} v^{y} + b^{yz} v^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\cdot  v = \\left ( b^{xy} v^{y} + b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy} v^{x} + b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz} v^{x} - b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  v =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  v = \\left ( b^{xy} v^{y} + b^{xz} v^{z}\\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy} v^{x} + b^{yz} v^{z}\\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz} v^{x} - b^{yz} v^{y}\\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b   b = - {\\left ( b^{xy} \\right )}^{2} - {\\left ( b^{xz} \\right )}^{2} - {\\left ( b^{yz} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\W  b =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\cdot  b = - {\\left ( b^{xy} \\right )}^{2} - {\\left ( b^{xz} \\right )}^{2} - {\\left ( b^{yz} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  b = - {\\left ( b^{xy} \\right )}^{2} - {\\left ( b^{xz} \\right )}^{2} - {\\left ( b^{yz} \\right )}^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  b = - {\\left ( b^{xy} \\right )}^{2} - {\\left ( b^{xz} \\right )}^{2} - {\\left ( b^{yz} \\right )}^{2} \\end{equation*}\n",
       "Multivector Functions:\n",
       "\\begin{equation*} s(X) = s \\end{equation*}\n",
       "\\begin{equation*} v(X) = v^{x}  \\boldsymbol{e}_{x} + v^{y}  \\boldsymbol{e}_{y} + v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b(X) = b^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "Products:\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}    s = \\partial_{x} s  \\boldsymbol{e}_{x} + \\partial_{y} s  \\boldsymbol{e}_{y} + \\partial_{z} s  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\W  s = \\partial_{x} s  \\boldsymbol{e}_{x} + \\partial_{y} s  \\boldsymbol{e}_{y} + \\partial_{z} s  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\lfloor  s = \\partial_{x} s  \\boldsymbol{e}_{x} + \\partial_{y} s  \\boldsymbol{e}_{y} + \\partial_{z} s  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}    v = \\left ( \\partial_{x} v^{x}  + \\partial_{y} v^{y}  + \\partial_{z} v^{z} \\right )  + \\left ( - \\partial_{y} v^{x}  + \\partial_{x} v^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} v^{x}  + \\partial_{x} v^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} v^{y}  + \\partial_{y} v^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\W  v = \\left ( - \\partial_{y} v^{x}  + \\partial_{x} v^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} v^{x}  + \\partial_{x} v^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} v^{y}  + \\partial_{y} v^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\cdot  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y}  + \\partial_{z} v^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\rfloor  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y}  + \\partial_{z} v^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\lfloor  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y}  + \\partial_{z} v^{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}    b = \\left ( - \\partial_{y} b^{xy}  - \\partial_{z} b^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} b^{xy}  - \\partial_{z} b^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} b^{xz}  + \\partial_{y} b^{yz} \\right ) \\boldsymbol{e}_{z} + \\left ( \\partial_{z} b^{xy}  - \\partial_{y} b^{xz}  + \\partial_{x} b^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\W  b = \\left ( \\partial_{z} b^{xy}  - \\partial_{y} b^{xz}  + \\partial_{x} b^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\cdot  b = \\left ( - \\partial_{y} b^{xy}  - \\partial_{z} b^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} b^{xy}  - \\partial_{z} b^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} b^{xz}  + \\partial_{y} b^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\rfloor  b = \\left ( - \\partial_{y} b^{xy}  - \\partial_{z} b^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} b^{xy}  - \\partial_{z} b^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} b^{xz}  + \\partial_{y} b^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\lfloor  b =  0 \\end{equation*}\n",
       "\\begin{equation*} s   \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} s  \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} s  \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} s  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} s \\W  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} s  \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} s  \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} s  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} s  \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} s  \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} s  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  \\boldsymbol{\\nabla}  =  0 \\end{equation*}\n",
       "\\begin{equation*} s   s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\W  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s   v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\W  v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  v =  0 \\end{equation*}\n",
       "\\begin{equation*} s   b = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\W  b = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  b = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  b =  0 \\end{equation*}\n",
       "\\begin{equation*} v   \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} + v^{z}  \\frac{\\partial}{\\partial z} + \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\left ( - v^{y}  \\frac{\\partial}{\\partial x} + v^{x}  \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\left ( - v^{z}  \\frac{\\partial}{\\partial x} + v^{x}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\left ( - v^{z}  \\frac{\\partial}{\\partial y} + v^{y}  \\frac{\\partial}{\\partial z}\\right ) \\end{equation*}\n",
       "\\begin{equation*} v \\W  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\left ( - v^{y}  \\frac{\\partial}{\\partial x} + v^{x}  \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\left ( - v^{z}  \\frac{\\partial}{\\partial x} + v^{x}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\left ( - v^{z}  \\frac{\\partial}{\\partial y} + v^{y}  \\frac{\\partial}{\\partial z}\\right ) \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} + v^{z}  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} + v^{z}  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} + v^{z}  \\frac{\\partial}{\\partial z} \\end{equation*}\n",
       "\\begin{equation*} v   s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\W  s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} + s  v^{z}  \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v   v = {v^{x} }^{2} + {v^{y} }^{2} + {v^{z} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\W  v =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  v = {v^{x} }^{2} + {v^{y} }^{2} + {v^{z} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  v = {v^{x} }^{2} + {v^{y} }^{2} + {v^{z} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  v = {v^{x} }^{2} + {v^{y} }^{2} + {v^{z} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v   b = \\left ( - b^{xy}  v^{y}  - b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy}  v^{x}  - b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz}  v^{x}  + b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} + \\left ( b^{xy}  v^{z}  - b^{xz}  v^{y}  + b^{yz}  v^{x} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\W  b = \\left ( b^{xy}  v^{z}  - b^{xz}  v^{y}  + b^{yz}  v^{x} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  b = \\left ( - b^{xy}  v^{y}  - b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy}  v^{x}  - b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz}  v^{x}  + b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  b = \\left ( - b^{xy}  v^{y}  - b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( b^{xy}  v^{x}  - b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( b^{xz}  v^{x}  + b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  b =  0 \\end{equation*}\n",
       "\\begin{equation*} b   \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( b^{xy}  \\frac{\\partial}{\\partial y} + b^{xz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{y} \\left ( - b^{xy}  \\frac{\\partial}{\\partial x} + b^{yz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{z} \\left ( - b^{xz}  \\frac{\\partial}{\\partial x} -  b^{yz}  \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\left ( b^{yz}  \\frac{\\partial}{\\partial x} -  b^{xz}  \\frac{\\partial}{\\partial y} + b^{xy}  \\frac{\\partial}{\\partial z}\\right ) \\end{equation*}\n",
       "\\begin{equation*} b \\W  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\left ( b^{yz}  \\frac{\\partial}{\\partial x} -  b^{xz}  \\frac{\\partial}{\\partial y} + b^{xy}  \\frac{\\partial}{\\partial z}\\right ) \\end{equation*}\n",
       "\\begin{equation*} b \\cdot  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( b^{xy}  \\frac{\\partial}{\\partial y} + b^{xz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{y} \\left ( - b^{xy}  \\frac{\\partial}{\\partial x} + b^{yz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{z} \\left ( - b^{xz}  \\frac{\\partial}{\\partial x} -  b^{yz}  \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  \\boldsymbol{\\nabla}  =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( b^{xy}  \\frac{\\partial}{\\partial y} + b^{xz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{y} \\left ( - b^{xy}  \\frac{\\partial}{\\partial x} + b^{yz}  \\frac{\\partial}{\\partial z}\\right )  + \\boldsymbol{e}_{z} \\left ( - b^{xz}  \\frac{\\partial}{\\partial x} -  b^{yz}  \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} b   s = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\W  s = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  s = b^{xy}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + b^{xz}  s  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + b^{yz}  s  \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b   v = \\left ( b^{xy}  v^{y}  + b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy}  v^{x}  + b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz}  v^{x}  - b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} + \\left ( b^{xy}  v^{z}  - b^{xz}  v^{y}  + b^{yz}  v^{x} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\W  v = \\left ( b^{xy}  v^{z}  - b^{xz}  v^{y}  + b^{yz}  v^{x} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\cdot  v = \\left ( b^{xy}  v^{y}  + b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy}  v^{x}  + b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz}  v^{x}  - b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  v =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  v = \\left ( b^{xy}  v^{y}  + b^{xz}  v^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( - b^{xy}  v^{x}  + b^{yz}  v^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - b^{xz}  v^{x}  - b^{yz}  v^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} b   b = - {b^{xy} }^{2} - {b^{xz} }^{2} - {b^{yz} }^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\W  b =  0 \\end{equation*}\n",
       "\\begin{equation*} b \\cdot  b = - {b^{xy} }^{2} - {b^{xz} }^{2} - {b^{yz} }^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\rfloor  b = - {b^{xy} }^{2} - {b^{xz} }^{2} - {b^{yz} }^{2} \\end{equation*}\n",
       "\\begin{equation*} b \\lfloor  b = - {b^{xy} }^{2} - {b^{xz} }^{2} - {b^{yz} }^{2} \\end{equation*}\n",
       "General 2D Metric\\newline\n",
       "Multivector Functions:\n",
       "\\begin{equation*} s(X) = s \\end{equation*}\n",
       "\\begin{equation*} v(X) = v^{x}  \\boldsymbol{e}_{x} + v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} b(X) = v^{xy}  \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "Products:\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}    s = \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{y} s  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\partial_{y} s  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\W  s = \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{y} s  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\partial_{y} s  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\cdot  s = Not Allowed \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\lfloor  s = \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{y} s  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\partial_{y} s  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}    v = \\left ( \\partial_{x} v^{x}  + \\partial_{y} v^{y} \\right )  + \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\partial_{y} v^{x}  + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} v^{x}  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{y} v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\W  v = \\frac{- \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\partial_{y} v^{x}  + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} v^{x}  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{y} v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  \\partial_{x} v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\cdot  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\rfloor  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  \\lfloor  v = \\partial_{x} v^{x}  + \\partial_{y} v^{y} \\end{equation*}\n",
       "\\begin{equation*} s   \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( \\frac{\\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} -  \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{y} \\left ( - \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} s \\W  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( \\frac{\\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} -  \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{y} \\left ( - \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} s \\cdot  \\boldsymbol{\\nabla}  = Not Allowed \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x} \\left ( \\frac{\\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} -  \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right )  + \\boldsymbol{e}_{y} \\left ( - \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  s }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  \\boldsymbol{\\nabla}  =  0 \\end{equation*}\n",
       "\\begin{equation*} s   s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\W  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\cdot  s = Not Allowed \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  s = {s }^{2} \\end{equation*}\n",
       "\\begin{equation*} s   v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} s \\W  v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} s \\cdot  v = Not Allowed \\end{equation*}\n",
       "\\begin{equation*} s \\rfloor  v = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} s \\lfloor  v =  0 \\end{equation*}\n",
       "\\begin{equation*} v   \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\left ( - \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  v^{x}  + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} v \\W  \\boldsymbol{\\nabla}  = \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\left ( - \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial x} + \\frac{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  v^{x}  + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{y} }{\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  - \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) ^{2}} \\frac{\\partial}{\\partial y}\\right ) \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  \\boldsymbol{\\nabla}  = v^{x}  \\frac{\\partial}{\\partial x} + v^{y}  \\frac{\\partial}{\\partial y} \\end{equation*}\n",
       "\\begin{equation*} v   s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} v \\W  s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  s = Not Allowed \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  s =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  s = s  v^{x}  \\boldsymbol{e}_{x} + s  v^{y}  \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} v   v = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  {v^{x} }^{2} + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  {v^{y} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\W  v =  0 \\end{equation*}\n",
       "\\begin{equation*} v \\cdot  v = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  {v^{x} }^{2} + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  {v^{y} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\rfloor  v = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  {v^{x} }^{2} + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  {v^{y} }^{2} \\end{equation*}\n",
       "\\begin{equation*} v \\lfloor  v = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  {v^{x} }^{2} + 2 \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  v^{x}  v^{y}  + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  {v^{y} }^{2} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('products_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={14in,11in},total={13in,10in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{ccc}\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  & \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} A = A  + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} A =  \\begin{aligned}[t]  & A  \\\\  &  + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\  &  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} A =  \\begin{aligned}[t]  & A  \\\\  &  + A^{x} \\boldsymbol{e}_{x} \\\\  &  + A^{y} \\boldsymbol{e}_{y} \\\\  &  + A^{z} \\boldsymbol{e}_{z} \\\\  &  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\  &  + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\  &  + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} A_{+} = A  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} A_{-} = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X Y =  \\begin{aligned}[t]  & \\left ( \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{y} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} + \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{z}\\right )  \\\\  &  + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}  \\end{aligned} \\end{equation*}\n",
       "\\begin{equation*} X\\W Y = \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\n",
       "\\begin{equation*} X\\cdot Y = \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} Y^{y} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{x} Y^{z} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y} Y^{y} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{y} Y^{z} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{y} + \\left (\\boldsymbol{e}_{z}\\cdot \\boldsymbol{e}_{z}\\right )  X^{z} Y^{z} \\end{equation*}\n",
       "\\begin{equation*} g_{ij} = \\left[\\begin{array}{cc}\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  & \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right ) \\\\\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  & \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right ) \\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A = A  + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\cdot A = - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} + A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} X\\rfloor A = - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} + A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\begin{equation*} A\\lfloor X = A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{x} + \\left (\\boldsymbol{e}_{y}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{x} - A^{xy} \\left(\\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{x}\\right )  X^{x} + \\left (\\boldsymbol{e}_{x}\\cdot \\boldsymbol{e}_{y}\\right )  X^{y}\\right) \\boldsymbol{e}_{y} \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('simple_check_latex')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={9in,10in},total={8in,9in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\begin{equation*} \\bm{\\mbox{Base manifold (three dimensional)}} \\end{equation*}\n",
       "\\begin{equation*} \\bm{\\mbox{Metric tensor (cartesian coordinates - norm = False)}} \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\begin{equation*} \\bm{\\mbox{Two dimensioanal submanifold - Unit sphere}} \\end{equation*}\n",
       "\\begin{equation*} \\text{Basis not normalised} \\end{equation*}\n",
       "\\begin{equation*} (\\theta,\\phi)\\rightarrow (r,\\theta,\\phi) =  \\left[ 1, \\  \\theta , \\  \\phi \\right] \\end{equation*}\n",
       "\\begin{equation*} e_\\theta \\cdot  e_\\theta =  1 \\end{equation*}\n",
       "\\begin{equation*} e_\\phi \\cdot  e_\\phi =  {\\sin{\\left (\\theta  \\right )}}^{2} \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cc}1 & 0\\\\0 & {\\sin{\\left (\\theta  \\right )}}^{2}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{g\\_inv = } \\left[\\begin{array}{cc}1 & 0\\\\0 & \\frac{1}{{\\sin{\\left (\\theta  \\right )}}^{2}}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{Christoffel symbols of the first kind: } \\end{equation*}\n",
       "\\begin{equation*} \\Gamma_{1, \\alpha, \\beta} =  \\left[\\begin{matrix}0 & 0\\\\0 & - \\frac{\\sin{\\left (2 \\theta  \\right )}}{2}\\end{matrix}\\right] \\quad \\Gamma_{2, \\alpha, \\beta} =  \\left[\\begin{matrix}0 & \\frac{\\sin{\\left (2 \\theta  \\right )}}{2}\\\\\\frac{\\sin{\\left (2 \\theta  \\right )}}{2} & 0\\end{matrix}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{Christoffel symbols of the second kind: } \\end{equation*}\n",
       "\\begin{equation*} \\Gamma^{1}_{\\phantom{1,}\\alpha, \\beta} =  \\left[\\begin{matrix}0 & 0\\\\0 & - \\frac{\\sin{\\left (2 \\theta  \\right )}}{2}\\end{matrix}\\right] \\quad \\Gamma^{2}_{\\phantom{2,}\\alpha, \\beta} =  \\left[\\begin{matrix}0 & \\frac{1}{\\tan{\\left (\\theta  \\right )}}\\\\\\frac{1}{\\tan{\\left (\\theta  \\right )}} & 0\\end{matrix}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  =  \\boldsymbol{e}_{\\theta } \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{{\\sin{\\left (\\theta  \\right )}}^{2}} \\frac{\\partial}{\\partial \\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{\\theta } f  \\boldsymbol{e}_{\\theta } + \\frac{\\partial_{\\phi } f }{{\\sin{\\left (\\theta  \\right )}}^{2}} \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} F = F^{\\theta }  \\boldsymbol{e}_{\\theta } + F^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F =  \\left ( \\frac{F^{\\theta } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\phi } F^{\\phi }  + \\partial_{\\theta } F^{\\theta } \\right )  + \\left ( \\frac{2 F^{\\phi } }{\\tan{\\left (\\theta  \\right )}} + \\partial_{\\theta } F^{\\phi }  - \\frac{\\partial_{\\phi } F^{\\theta } }{{\\sin{\\left (\\theta  \\right )}}^{2}}\\right ) \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\begin{equation*} \\mbox{One dimensioanal submanifold} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Basis not normalised} \\end{equation*}\n",
       "\\begin{equation*} (\\phi)\\rightarrow (\\theta,\\phi) =  \\left[ \\frac{\\pi}{8}, \\  \\phi \\right] \\end{equation*}\n",
       "\\begin{equation*} e_\\phi \\cdot  e_\\phi =  \\frac{1}{2} - \\frac{\\sqrt{2}}{4} \\end{equation*}\n",
       "\\begin{equation*} g =  \\left[\\begin{array}{c}\\frac{1}{2} - \\frac{\\sqrt{2}}{4}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  =  \\boldsymbol{e}_{\\phi } \\left ( 2 \\sqrt{2} + 4\\right ) \\frac{\\partial}{\\partial \\phi } \\end{equation*}\n",
       "\\begin{equation*} \\nabla h =  \\left(2 \\sqrt{2} + 4\\right) \\partial_{\\phi } h  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} H = H^{\\phi }  \\boldsymbol{e}_{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\nabla H =  \\partial_{\\phi } H^{\\phi } \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('christoffel_symbols')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\n",
       "\\documentclass[10pt,fleqn]{report}\n",
       "\\usepackage[vcentering]{geometry}\n",
       "\\geometry{papersize={9in,10in},total={8in,9in}}\n",
       "\n",
       "\\pagestyle{empty}\n",
       "\\usepackage[latin1]{inputenc}\n",
       "\\usepackage{amsmath}\n",
       "\\usepackage{amsfonts}\n",
       "\\usepackage{amssymb}\n",
       "\\usepackage{amsbsy}\n",
       "\\usepackage{tensor}\n",
       "\\usepackage{listings}\n",
       "\\usepackage{color}\n",
       "\\usepackage{xcolor}\n",
       "\\usepackage{bm}\n",
       "\\usepackage{breqn}\n",
       "\\definecolor{gray}{rgb}{0.95,0.95,0.95}\n",
       "\\setlength{\\parindent}{0pt}\n",
       "\\DeclareMathOperator{\\Tr}{Tr}\n",
       "\\DeclareMathOperator{\\Adj}{Adj}\n",
       "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n",
       "\\newcommand{\\lp}{\\left (}\n",
       "\\newcommand{\\rp}{\\right )}\n",
       "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n",
       "\\newcommand{\\half}{\\frac{1}{2}}\n",
       "\\newcommand{\\llt}{\\left <}\n",
       "\\newcommand{\\rgt}{\\right >}\n",
       "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n",
       "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n",
       "\\newcommand{\\lbrc}{\\left \\{}\n",
       "\\newcommand{\\rbrc}{\\right \\}}\n",
       "\\newcommand{\\W}{\\wedge}\n",
       "\\newcommand{\\prm}[1]{{#1}'}\n",
       "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n",
       "\\newcommand{\\R}{\\dagger}\n",
       "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n",
       "\\newcommand{\\grade}[1]{\\left < {#1} \\right >}\n",
       "\\newcommand{\\f}[2]{{#1}\\lp{#2}\\rp}\n",
       "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n",
       "\\newcommand{\\Nabla}{\\boldsymbol{\\nabla}}\n",
       "\\newcommand{\\eb}{\\boldsymbol{e}}\n",
       "\\usepackage{float}\n",
       "\\floatstyle{plain} % optionally change the style of the new float\n",
       "\\newfloat{Code}{H}{myc}\n",
       "\\lstloadlanguages{Python}\n",
       "\n",
       "\\begin{document}\n",
       "\\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}\n",
       "\\definecolor{applegreen}{rgb}{0.55, 0.71, 0.0}\n",
       "\\definecolor{atomictangerine}{rgb}{1.0, 0.6, 0.4}\n",
       "\\begin{equation*} \\bm{\\mbox{Base manifold (three dimensional)}} \\end{equation*}\n",
       "\\begin{equation*} \\bm{\\mbox{Metric tensor (cartesian coordinates - norm = False)}} \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{ccc}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\begin{equation*} \\bm{\\mbox{Two dimensioanal submanifold - Unit sphere}} \\end{equation*}\n",
       "\\begin{equation*} \\text{Basis not normalised} \\end{equation*}\n",
       "\\begin{equation*} (\\theta,\\phi)\\rightarrow (r,\\theta,\\phi) =  \\left[ 1, \\  {\\color{airforceblue}\\theta}, \\  {\\color{applegreen}\\phi}\\right] \\end{equation*}\n",
       "\\begin{equation*} e_\\theta \\cdot  e_\\theta =  1 \\end{equation*}\n",
       "\\begin{equation*} e_\\phi \\cdot  e_\\phi =  {\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2} \\end{equation*}\n",
       "\\begin{equation*} g = \\left[\\begin{array}{cc}1 & 0\\\\0 & {\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{g\\_inv = } \\left[\\begin{array}{cc}1 & 0\\\\0 & \\frac{1}{{\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2}}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{Christoffel symbols of the first kind: } \\end{equation*}\n",
       "\\begin{equation*} \\Gamma_{1, \\alpha, \\beta} =  \\left[\\begin{matrix}0 & 0\\\\0 & - \\frac{\\sin{\\left (2 {\\color{airforceblue}\\theta} \\right )}}{2}\\end{matrix}\\right] \\quad \\Gamma_{2, \\alpha, \\beta} =  \\left[\\begin{matrix}0 & \\frac{\\sin{\\left (2 {\\color{airforceblue}\\theta} \\right )}}{2}\\\\\\frac{\\sin{\\left (2 {\\color{airforceblue}\\theta} \\right )}}{2} & 0\\end{matrix}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\text{Christoffel symbols of the second kind: } \\end{equation*}\n",
       "\\begin{equation*} \\Gamma^{1}_{\\phantom{1,}\\alpha, \\beta} =  \\left[\\begin{matrix}0 & 0\\\\0 & - \\frac{\\sin{\\left (2 {\\color{airforceblue}\\theta} \\right )}}{2}\\end{matrix}\\right] \\quad \\Gamma^{2}_{\\phantom{2,}\\alpha, \\beta} =  \\left[\\begin{matrix}0 & \\frac{1}{\\tan{\\left ({\\color{airforceblue}\\theta} \\right )}}\\\\\\frac{1}{\\tan{\\left ({\\color{airforceblue}\\theta} \\right )}} & 0\\end{matrix}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  =  \\boldsymbol{e}_{{\\color{airforceblue}\\theta}} \\frac{\\partial}{\\partial {\\color{airforceblue}\\theta}} + \\boldsymbol{e}_{{\\color{applegreen}\\phi}} \\frac{1}{{\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2}} \\frac{\\partial}{\\partial {\\color{applegreen}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  f = \\partial_{{\\color{airforceblue}\\theta}} f  \\boldsymbol{e}_{{\\color{airforceblue}\\theta}} + \\frac{\\partial_{{\\color{applegreen}\\phi}} f }{{\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2}} \\boldsymbol{e}_{{\\color{applegreen}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} F = F^{{\\color{airforceblue}\\theta}}  \\boldsymbol{e}_{{\\color{airforceblue}\\theta}} + F^{{\\color{applegreen}\\phi}}  \\boldsymbol{e}_{{\\color{applegreen}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  F =  \\left ( \\frac{F^{{\\color{airforceblue}\\theta}} }{\\tan{\\left ({\\color{airforceblue}\\theta} \\right )}} + \\partial_{{\\color{airforceblue}\\theta}} F^{{\\color{airforceblue}\\theta}}  + \\partial_{{\\color{applegreen}\\phi}} F^{{\\color{applegreen}\\phi}} \\right )  + \\left ( \\frac{2 F^{{\\color{applegreen}\\phi}} }{\\tan{\\left ({\\color{airforceblue}\\theta} \\right )}} + \\partial_{{\\color{airforceblue}\\theta}} F^{{\\color{applegreen}\\phi}}  - \\frac{\\partial_{{\\color{applegreen}\\phi}} F^{{\\color{airforceblue}\\theta}} }{{\\sin{\\left ({\\color{airforceblue}\\theta} \\right )}}^{2}}\\right ) \\boldsymbol{e}_{{\\color{airforceblue}\\theta}}\\wedge \\boldsymbol{e}_{{\\color{applegreen}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\begin{equation*} \\mbox{One dimensioanal submanifold} \\end{equation*}\n",
       "\\begin{equation*} \\mbox{Basis not normalised} \\end{equation*}\n",
       "\\begin{equation*} (\\phi)\\rightarrow (\\theta,\\phi) =  \\left[ \\frac{\\pi}{8}, \\  {\\color{atomictangerine}\\phi}\\right] \\end{equation*}\n",
       "\\begin{equation*} e_\\phi \\cdot  e_\\phi =  \\frac{1}{2} - \\frac{\\sqrt{2}}{4} \\end{equation*}\n",
       "\\begin{equation*} g =  \\left[\\begin{array}{c}\\frac{1}{2} - \\frac{\\sqrt{2}}{4}\\end{array}\\right] \\end{equation*}\n",
       "\\begin{equation*} \\boldsymbol{\\nabla}  =  \\boldsymbol{e}_{{\\color{atomictangerine}\\phi}} \\left ( 2 \\sqrt{2} + 4\\right ) \\frac{\\partial}{\\partial {\\color{atomictangerine}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\nabla h =  \\left(2 \\sqrt{2} + 4\\right) \\partial_{{\\color{atomictangerine}\\phi}} h  \\boldsymbol{e}_{{\\color{atomictangerine}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} H = H^{{\\color{atomictangerine}\\phi}}  \\boldsymbol{e}_{{\\color{atomictangerine}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\nabla H =  \\partial_{{\\color{atomictangerine}\\phi}} H^{{\\color{atomictangerine}\\phi}} \\end{equation*}\n",
       "\\begin{equation*} \\ \\end{equation*}\n",
       "\\end{document}\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "check('colored_christoffel_symbols')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
